Folder structure for images
See original GitHub issueIn the latest version images are sent to the public folder under the images/
directory. This is great and an improvement on being placed into the root of the public directory.
However I’m wondering if there is configuration options to allow the path to be copied, for example if I have this structure:
- images/
- vendor/
- lightbox/
- close.png
- image2.png
- lightbox/
- image1.jpg
- vendor/
These are currently all sent to the images/
folder. I’d like the ability to copy the structure over too, apparently the [path]
or [folder]
can be used but this results in:
Using [path]
images/resources/assets/images/vendor/lightbox/close.png
Using [folder]
images/lightbox/close.png
Is there anyway of getting only a substring of the path (so it excludes resources/assets/images
in the [path]
)?
I realise I could simply move my images folder to the project root… but it would be nice to resolve this without doing that.
Thanks (I hope this is the best place to post this, otherwise I could move it to a forum…)
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
@david-ridgeonnet sorry in advance if I’m not following you correctly, but try this…
.copy('resources/assets/images', 'public/images', false)
copy()
takes a third parameter.Also, it’s not only for clarity, because for example I have a
loading.gif
in my application, but kartik-v/bootstrap-fileinput also has one, which overrides the original one, so it’d definitely be an improvement if these images would be moved intovendor/vendorname/imagename.ext
as default.