Hotlinked Images Frequently Get Stretched To Unnatural Dimensions
-
Dear support,
I run an Amazon affiliate website where I load images from Amazon’s API, for multiple product reviews on the same page.
I have pages with dozens of such image loads.
On the AMP pages, some images get stretched to unnatural 1000 pixel widths.
Observations:
1. This only happens when my site is running on its production server, but not when the site is running on my localhost.
2. All images have similar img tag code. Upon AMP page reload, it’s always the same images that get stretched, and the same ones that don’t. It seems to be deterministic, even though you’d expect it to be random (since all images have similar html).
My suspicion is that it has something to do with deferred image loading. Your AMP pages are unable to correctly determine a hotlinked image’s width, and therefore go for the default of 1000px.
Hardcoding an image width on my images in my HTML pages did not resolve this problem. It gave the image the right width, but not the right height. And I do not know the correct height upfront, since the image is hotlinked. So the AMP page computes an aspect-ratio incorrect height, and the image appears too small.
In SEO, it’s custom to keep your websites to yourself, so I am hesitant to share my problematic AMP page here.
Can you (support) give me an email so that I can send an example of image widths going wrong?
Sincerely,
Jay
- The topic ‘Hotlinked Images Frequently Get Stretched To Unnatural Dimensions’ is closed to new replies.