Closed ilicmarko closed 5 years ago
Yes, this is the intended behavior, even if you choose to upload the transformed file to one or more external storages, the transform in the imagerSystemPath
is still the "master" and is used for caching. The setting cacheRemoteFiles
refers to the copy that Imager has to download from an external source to do the transform, not the transform itself.
One of the main motivations behind making Imager was to have something that was completely file-based, and not rely on looking up a transform in the database to know if it exists or not, which the native Craft transforms do. But if your main motivation is saving space, you should instead just use native transforms.
Maybe my logic behind this is wrong but
imager
is not working like "I would like to". So all my assets are setup with an S3 bucket, now I wanted to optimize all uploaded images and also upload to S3.I saw there were some issues with this but for me it worked without a problem.
Here is my config:
What is the problem? The problem with this is that Imager is storing the images locally. I know it needs to download the images (because they are remote) before transforming them, but why doesn't it delete after the transformation. For this reason I tried to disable "cache":
How I imagined it working is:
I really didn't have time to dig to deep in the code but from what I see here:
https://github.com/aelvan/Imager-Craft/blob/b8f9af372dc9fb60d778cdc1a00a6b7026bf0986/src/transformers/CraftTransformer.php#L196-L198
Imager needs a local copy? Correct me if I am wrong.
Why am I asking this? The whole (one of) idea of us using S3 was to offload the storage to AWS and not fill up the server. If imager works like this (or I didn't configure it right), we will fill up the local server and S3 will work ONLY as CDN.
Why is this a problem? Because we deploy on Heroku and upload changes are not persistent and will be cleaned out, therefore making this useless.