Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
jbjanot opened this issue Oct 12, 2015 · 0 comments
Open

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

jbjanot opened this issue Oct 12, 2015 · 0 comments

Comments

@jbjanot
Copy link

jbjanot commented Oct 12, 2015

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 !

@jbjanot jbjanot changed the title Resize the same width Resize an image to the same size as the original Oct 12, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant