Support » Plugin: reSmush.it Image Optimizer » Issue when thumbnail images are regenerated

  • Hi,

    I found a few issues with this plugin. Our plugin Media Library Folders includes the ability to regenerate thumbnails for a individual images or for all images on a site. When reSmush.it is running on a site, the thumbnail files are regenerated but there is a problem when getting the thumbnail images from WordPress using the wp_get_attachment_image(). Normally the function will return HTML like this,

    <img width="150" height="150" src="http://localhost/testsite/wp-content/uploads/2017/01/test-image-150x150.jpg" class="attachment-thumbnail size-thumbnail" alt="" />

    but after regenerating the thumbnails this function will return HTML like this:

    <img width="1" height="1" src="http://localhost/testsite/wp-content/uploads/2017/01/test-image.jpg" class="attachment-thumbnail size-thumbnail" alt="" />

    Somehow the thumbnail sizes are not updated correctly.

    Also, I noticed that the plugin generates a few PHP warnings when WordPress debugging is turned on: Undefined variable: files_not_found and Undefined index: dirname.

    • This topic was modified 1 year, 2 months ago by AlanP57.
Viewing 6 replies - 1 through 6 (of 6 total)
  • Commenting here since this was the problem I was having. I’m curious to hear more on this.

    Plugin Author reSmush.it

    (@resmushit)

    Hi guys,

    As we said in a previous post, the usual behavior of WordPress is changed when you use a custom media library such as Media Library Folder. Hence, reSmush.it is not able to work properly and it can result as unstable actions.

    We advice not to use reSmush.it when there’s a custom Media library, as they’re all designed in a different way, it would be impossible to create specific rules in our plugin.

    Cheers,
    Charles

    You are mistaken. Media Library Folders is not a custom media library since it only adds functionality to the standard WordPress media library. As far as I can tell, reSmush.it removes the standard thumbnail meta data form the postmeta table for regenerated images and it is no longer available when a thumbnail image is requested using the WordPress function, wp_get_attachment_image(). There is nothing custom about this.

    eva29

    (@eva29)

    Hi,
    I am experiencing the same behaviour (<img width=”1″ height=”1″) but I have no custom media library. It is default media library. But, I was using “Regenerate thumbnails” plugin.
    I tested :

    – disabled plugin “Regenerate thumbnails”
    – created a new add_image_size()
    – then forced a reoptimisation on a picture
    = It did not resize the image to the new size obviously, but no width and heigh problem.

    -I re-activated plugin “Regenerate thumbnails”
    – forced a reoptimisation on this picture
    = No problem either.

    – I regenerate thumbnail with the plugin button in the picture page of media library
    = It is messed up again ( + no custom size detected anymore, it switched to full size)

    When “reSmush.it Image Optimizer” plugin is disabled, “Regenerate thumbnails” works fine. I guess they are interfering with each other.

    jasom

    (@jasom)

    I have same problem and I confirm this solution works:

    When “reSmush.it Image Optimizer” plugin is disabled, “Regenerate thumbnails” works fine.

    Plugin Author reSmush.it

    (@resmushit)

    Hi guys,

    We’ve released a new version of our plugin today which should help a little 🙂

    Keep us in touch, we greatly appreciate any feedback !

    Cheers,
    Charles

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Issue when thumbnail images are regenerated’ is closed to new replies.