0

Transformed Images are failing to load with a 404 error For example:

http://mysite.com/index.php?p=cpresources/transforms/382&x=v0nGRK3Qr

This happened after I swapped the db. So, everything had previously been working.

Also:

  • My images reside /public_html/mysite/img/posts/

  • BUT, Update Asset Indexes generates The path of your source "Main Post Image" appears to be invalid And, none of the images load when I try to view Assets in cp.

  • I can access the image from the public URL to the assets is http://www.mysite.com/img/posts. And, I can access the original uploaded images here.

  • I assume the path to my images (which I understand can be different from the URL) is the problem.

  • Path is current set to /mysite/img/posts/'. I have tried multiple permutations - nothing seems to work.

Help/Thanks

  • I tried adding generateTransformsBeforePageLoad to general.php. But, I still get a 404 error and the image transforms do not load. – Hellyar Aug 9 '17 at 13:42
  • Oh, I tried a fresh re-install of Craft and the db. – Hellyar Aug 9 '17 at 13:53
2

/mysite/img/posts/ is an absolute path pointing to the root of your drive mount.

You probably just need to make it relative. i.e. either mysite/img/posts or ./mysite/img/posts.

  • Nope. I have tried every which freaking way. – Hellyar Aug 9 '17 at 20:13
  • Incredible. It was a freaking period. ./img/posts/ worked. Held up by a freaking "." Ugh. Thanks. – Hellyar Aug 9 '17 at 20:29

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.