Craft 4: Separate filesystems for image uploads and image transforms #13895
Closed
jannisborgers
started this conversation in
General
Replies: 1 comment 3 replies
-
Not following. How can two separate source folders ( |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I usually download all images from the production site to my local machine with
scp
orrsync
when working on a site after longer periods of live editing. Downloads take a long time when image transforms are saved in the same folder the originals are saved in.Since filesystems in Craft 4 allow separating the originally uploaded images from the transformed ones, I created two filesystems:
images
with url@web/images
and path@webroot/uploads/images
images_transformed
with url@web/images
and path@webroot/images_transformed
In the volume
images
, I assign theimages
filesystem andimages_transformed
filesystems accordingly.Expectation
Both transformed (template) and untransformed (e.G. richtext) images share the
domain.tld/images/…
URL format. When setting up the site locally, I download only the/web/uploads
folder from the production server and let Craft generate the transforms locally, saving bandwidth and time needed to download files from the server.Result
The file systems only work when the base URL matches the base path. Is there a way to use different formats for the base URL and the base path? The current behavior is okay-ish, but clean, unnested URLs would be even better. Right now, when an editor places an untransformed image in a rich text field, the URL has to be
domain.tld/uploads/images
. The formatdomain.tld./images
would be preferable.Beta Was this translation helpful? Give feedback.
All reactions