I'm having an issue with specific images on my site that are failing to load in Chromium-based browsers like Chrome, but they work perfectly in Safari and Firefox. The response from CloudFront shows a 200 status code, but the downloaded bytes are zero even though everything else appears to be correct, including the headers and ranges. If I check the images directly in S3, they load just fine. Could the problem be related to serving the images over an insecure connection? I've already performed a full cache invalidation on the CloudFront distribution, but the issue persists. I need help figuring out what might be wrong since other images are loading without a hitch. Here are the image URLs for reference:
1. https://d2znn9btt9p4yk.cloudfront.net/a19e894e-78fc-4704-8d03-f6d67fde9dd1.jpg
2. https://d2znn9btt9p4yk.cloudfront.net/d848ceb2-ad51-49dd-8ceb-e143631d2af5.jpg
3. https://d2znn9btt9p4yk.cloudfront.net/cb4f1453-7707-474c-acd8-8ec7077463ea.jpg
4. https://d2znn9btt9p4yk.cloudfront.net/ab958ee1-2b82-4350-9684-2adc1000d44a.jpg
Has anyone else faced this issue? I'm not sure where to start debugging this problem.
3 Answers
It sounds like your images might not actually be in JPEG format despite their file extensions. Some users, including me, have had similar issues where it turns out the images were saved in a different format like HEIF but mislabeled as .jpg. Try converting the images to pure JPEGs and re-uploading them to S3. That could help resolve the issue!
Check your CloudFront logs for the requests to see if there's anything unusual. You might find useful information there that could point to the issue. If the content length or ranges seem off, that could be a red flag.
I did check the logs and they seemed fine at a glance, but I'll dive deeper. Thanks for the tip!
Another thing to consider is the content type. Make sure that the images are uploaded with the correct MIME type set. If they're labeled as image/jpeg when they aren't, it could definitely be causing issues in certain browsers.
Good point! I'll double-check the settings in S3 to ensure they're correct.
Thanks for the suggestion! We'll look into whether our manual compressing is affecting the format.