Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Hi @rahuljain012

    Please reply with these information to help us troubleshoot the issue you’re getting:

    – If you upload images through Media Library, do you enable the option “Resize this image to match your settings” ?: https://ibb.co/9HgjqSb

    – Which sizes you’re generating under WooCommerce > Smart Image Resize? Try to only use the ones prefixed by woocommerce_ and shop_

    – Are you trying to upload large images (e.g. more than 1500px in width or height) ? If yes, make sure your server memory limit is set to at least 512M since image manipulation is resource-intensive task.

    – Can you share your shop URL if it’s live or send it to [email protected]?

    Happy to help!

    Best,
    Nabil

    • This reply was modified 4 years, 7 months ago by Nabil Lemsieh.
    Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Regarding the first point, you can watch this short demo to see how it works: https://streamable.com/lklvpq

    Best,
    Nabil

    Thread Starter rahuljain012

    (@rahuljain012)

    Actually its an classified website, so when people post their ads it is not resizing. i have the exact problem as you showed in your screenshot ( https://ps.w.org/smart-image-resize/assets/screenshot-1.jpg?rev=1974177 )
    – memory limit 512M.
    – thanks in advance

    Thread Starter rahuljain012

    (@rahuljain012)

    And the demo link which you have sent is not working.

    Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Hi @rahuljain012

    Thanks for your reply,

    Please note that the plugin resizes only product images by default, to resize other images, try this:

    Are ads posted to products? If yes, add this code snippet to allow frontend uploads, under Appearance > Theme Editor > functions.php:

    add_filter('wp_sir_process_frontend_upload', '__return_true');

    However, if ads are posted to a custom post type, you need to add it to allowed post types by using this code snippet:

    
    add_filter('wp_sir_process_frontend_upload', '__return_true');
    
    add_filter('wp_sir_resize_post_type', function($post_types){
    $post_types = (array) $post_types;
    $post_types[] = 'post_type_name';
    
    return $post_types;
    
    });

    Note: Make sure you change post_type_name with one used for ads.

    If you need further help with the code above, let me know if you’re using a plugin to post ads and share your site URL.

    Best,
    Nabil

    Plugin Author Nabil Lemsieh

    (@nlemsieh)

    I’m marking this thread as resolved due to inactivity. If you still need help, feel free reply to this thread or create a new ticket.

    Thread Starter rahuljain012

    (@rahuljain012)

    is there any another method?. as the code is not uploading in functions.php

    Thread Starter rahuljain012

    (@rahuljain012)

    is there any other method?. as the code given by you is not updating in functions.php

    Plugin Author Nabil Lemsieh

    (@nlemsieh)

    Hi @rahuljain012

    As I don’t know how images are uploaded it will difficult to provide a working code. Please contact us at support[at]sirplugin.com with your shop URL to help you further.

    Best,
    Nabil

    Thread Starter rahuljain012

    (@rahuljain012)

    okay

    Plugin Author Nabil Lemsieh

    (@nlemsieh)

    After I checked the website URL (shared via email), which isn’t a WooCommerce store, the images are obviously attached to blog posts. By making a small change to the code snippet above will allow the plugin to resize blog images:

    add_filter('wp_sir_process_frontend_upload', '__return_true');
    
    add_filter('wp_sir_resize_post_type', function($post_types){
    $post_types = (array) $post_types;
    $post_types[] = 'post';
    
    return $post_types;
    
    });
Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘images are not resizing upon uploading’ is closed to new replies.