Update thumbnails metadata for not-regenerated thumbnails
-
I noticed your plugin has a problem in the following scenario:
1) We have default thumbnail size 150×150 with a crop set to true
2) We add image lower than the size specified in point 3
3) We change the thumbnail size to e.g. 300×300
4) We regenerate thumbnails using your plugin, it is probably somehow skipping the images that have lower dimensions than 300×300
5) We use the_post_thumbnail(“thumbnail”) and wordpress is trying to use 150×150 version which is bad, so the image is not displayed (if we removed the previous thumbnail). Why is he doing that?I see the problem exists because you do not clean the sizes in the _wp_attachment_metadata for the mentioned scenario, so after regenerating thumbnails we still have thumbnail size 150×150 in the ‘sizes’ meta. I needed to manually empty ‘sizes’ (set them to array()), because our image is smaller than any thumbnail size, so it does not have thumbnail 150×150 now.
- The topic ‘Update thumbnails metadata for not-regenerated thumbnails’ is closed to new replies.