Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Photon does not return dimensions with `wp_get_attachment_image_src` #2281
If you do this:
The workaround for this is discussed here: https://wordpress.org/support/topic/wp_get_attachment_image_src-changed?replies=5#post-3950371
The workaround is to get the dimensions without Photon, then get the image URL normally:
Fix should be that those dimensions should still be applied when Photon is activated.
I would like to revisit this.
Since Photon essentially modifies the url of the image to serve it from another location, I would think that the only thing changed in the behavior in WP functions is the url of an image.
In my case, I use the dimensions returned by
In my opinion, the function should work like before, only that that the url is now different. Since the Photon service doesn't return any image meta data, then if we use the width & height data of what WordPress has stored already, then the original function behavior can be upheld.
What do you guys think?