1

I created a new asset source/folder called "my-assets".

It has an entry in the DB in "craft_assetsources" with the id=10, path="my_base_folder/assets/my-assets/" and url="/assets/my-assets/",

plus an entry in the "craft_assetfolders" with the id=27, sourceID=10 and name="my-assets".

Then I've created a subfolder called "my-images", which only has an entry in "craft_assetfolders" with id=28, sourceID=10 and path="my-images/".

When I use the myImage.asset.getUrl() on an image from that subfolder, I get the url "/assets/my-assets/myImage.jpg" instead of "/assets/my-assets/my-images/myImage.jpg", which obviously results in the image not being found.

Any ideas why this happens and especially how to fix it?

I appreciate any help!

1

Go to setting, then try to click Update Assets Indexes.

1
  • Thanks for the answer :) Because of the lack of time I already changed the my-images folder to directly be located in the root. So I couldn't try your suggestion, but I will next time, thanks ;) – Laila Aug 29 '17 at 8:09

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.