I have a multi-lingual site with a folder structure set up like this:
/craft
/assets
-/images
/nl
-index.php
/fr
-index.php
index.php
I have an asset source set up like this:
File system path: assets/images/
File URL: http://krycer.be/assets/images/
This allows me to upload images without any problems and they are uploaded in the correct folder on the server.
I use image transforms in my templates by using the {{ asset.getUrl('imageTransformHandle') }}
but this gives me errors. The images are not generated (there is no redirect to the generated image, the URL is linking to the cpResources/transform/ID).
When I try this code in devMode 'generateTransformsBeforePageLoad' => true
it gives me an error that it cannot find the file (allthough it is definitely on the server).
I tracked this issue back to the fact that I have sub folders for my languages (nl/fr) and probably the image transform module searches a path from the local index.php file.
So when I adjust the asset source to ../assets/images/
the transforms are generated and I can see the images.
But then I have the problem that I can no longer upload any images because the path is not correct (because the asset source is probably looking in relation to the top index.php file, being the one above the nl/fr folders).
How do I fix this and is this a bug or is there an easy idea behind it I do not grasp?