After a Craft 2 to Craft 3 upgrade a few months ago, I'm going back and cleaning up a few lower-priority issues left over from that. This is one of those. A number of entries have embedded image assets that look OK in the control panel within the entry, but are 404ing on the front end. No Twig error or anything, which is different from seemingly similar questions asked here by others—it's just giving me an incorrect asset URL.

Those files DO exist at slightly different URL patterns, suggesting something is going awry in Craft image transforms. For example, the front end template for one entry tries to display https://foo.com/assets/site/main/features/_600xAUTO_crop_center-center_none/bar.jpeg which 404s, but a file https://foo.com/assets/site/main/features/_600xAUTO_crop_center-center/bar.jpeg (same URL with "_none" removed) does exist.

Weirdly, https://foo.test/assets/site/main/features/_600xAUTO_crop_center-center_none/bar.jpeg (note it does have the "_none") is what's referred to on the local dev version of the site, and it does work there.

I didn't change any image transforms settings or anything like that in the course of the upgrade. I don't know enough about how image transforms work to really have a good sense of where to start debugging when the local dev version actually works just fine.

Lastly, doing an Integrity crawl of the site to identify how many are broken this way showed me only 140 images, across a site with over 11,000 entries and 39,000 assets. Which is why I back-burnered this as low priority, but at this point I need to get it cleaned up—and to be sure it isn't an ongoing problem I'll have to deal with again.

Thanks in advance for any light anyone can shed!

  • I assume this might have something to do with different defaults or the the focal-point feature. Have you tried to clear the image cache? And make Craft regenerate them? – Max Strebel Apr 26 '20 at 10:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.