gambitph / WP-OTF-Regenerate-Thumbnails

Automatically regenerates your thumbnails on the fly when thumbnail sizes change.
https://wordpress.org/plugins/otf-regenerate-thumbnails/
GNU General Public License v2.0
77 stars 16 forks source link

Resize an image to the same size as the original #18

Open jbjanot opened 8 years ago

jbjanot commented 8 years ago

Hi ! Thank you for your plugin, it's very useful on daily WordPress developement.

A bug appeared in one of my current projects. When my base image is the same dimensions as the desired resized image, it creates a buggy resulting image.

Example :

My image uploaded in the media library is 300 x 600 pixels.

In my function, I have this code : wp_get_attachment_image_src($image_id, array(300, 600));

It creates an image that is interpreted as 0x0 in google chrome : buggy

I don't understand why it resizes the image and creates a new one, as the base image is already at the desired dimensions. Is there a way to prevent this ?

Any idea about the chrome buggy image dimensions ? I am wondering if it may be a meta-data related problem.

Thank you for your help !