Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable image preset generation on upload? #804

Closed
klickreflex opened this issue May 20, 2022 · 5 comments
Closed

Disable image preset generation on upload? #804

klickreflex opened this issue May 20, 2022 · 5 comments

Comments

@klickreflex
Copy link

klickreflex commented May 20, 2022

Statamic always generates all image presets defined in assets.image_manipulation.presets on upload.
This is nice if all your images are required in any preset available, but it can quickly blow up disk space when dealing with lots of images in many different formats, where. not every image is required in every format/preset.

I usually have a bunch of image presets that are used in some components, but many other components have custom glide settings and are only ever displayed in this variant.

Another scenario might be using preset 1 only in component A, and preset 2 only in component B. So preset 1 is never needed for an image used in component B and preset 2 is never needed for an image used in component A, yet all defined variants are generated and stored on disk forever (or until please glide:clear is run).

It would be cool if we could just disable the automatic generation of presets upon upload with a config option. (SAVE_CACHED_IMAGES has no effect on this behavior).

@Alpenverein
Copy link

Would be interesting for me too. We had a first test of our new system with a bigger group of our future editors. When they started to write articles and uploaded images, the system became slower and slower and finally stopped working/responding. I found out, that the reason was the calculation of all the different image presets....

So: Yes please!

@jesseleite
Copy link
Member

@klickreflex @Alpenverein This is already implemented in statamic/cms#6040, where you'll be able to glide_warm_presets: false to completely disable, or specify which image manipulation presets each container pre-warms on upload. Not merged yet, but probably coming soon! 👍

@klickreflex
Copy link
Author

@jesseleite This is great news, thanks 🙏
Once merged, where would I set glide_warm_presets: false? I can't find any new config in statamic/cms#6040

@jesseleite
Copy link
Member

@klickreflex It would go on your asset container yaml file. There'll also be control panel UI for this in the asset container's settings...

image (20)

@klickreflex
Copy link
Author

Oh nice, thanks for explaining @jesseleite

jasonvarga pushed a commit to statamic/cms that referenced this issue Jan 10, 2023
Co-authored-by: StyleCI Bot <bot@styleci.io>
Co-authored-by: Jason Varga <jason@pixelfear.com>
Closes statamic/ideas#485
Closes statamic/ideas#804
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants