2

I have 2 basic JSON files, the only difference between the files is the product.type('')

In my general.php I have turned on 'generateTransformsBeforePageLoad' => true,

The first JSON file (200 products ) loads within 2 second and the image is like this:

http:\/\/mysite.dev\/files\/coins\/_transform\/1763-myImage.jpg

The second file (30 products) takes 10+ seconds to load, and displays the image like this:

http:\/\/mysite.dev\/cpresources\/404?x=CjvOQxsnA

I am using the same image transform for both files. Why is it that the image in the second file isn't saved, because of this it takes 10+ seconds for the file to load.

I am using the same exact code for generating the transforms so I don't know why this is happening.

3

If I remember correctly, you will see urls similar to this http:\/\/mysite.dev\/cpresources\/404?x=CjvOQxsnA if you have generateTransformsBeforePageLoad as false.

It could genuinely be the case that the original file is not there so it's 404ing (as the link suggests it is). If you are running multi-environments, have you got all the assets on your locale env?

Maybe try clear your cache, or, your storage/runtime folder if you have all the assets and try again?

  • You are right, for some reason craft can't find the images even though the actual image is in my folder. Thanks! – Branko Feb 3 '17 at 12:13
  • Maybe try find this particular file in the asset manager itself, then try "view" the file from there and see where it thinks it is located – joep Feb 3 '17 at 12:17

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.