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

Resize Images on Upload #937

Closed
sjclark opened this issue Jan 16, 2023 · 1 comment
Closed

Resize Images on Upload #937

sjclark opened this issue Jan 16, 2023 · 1 comment

Comments

@sjclark
Copy link

sjclark commented Jan 16, 2023

😄 It would be great if images could be resized to a definable maximum dimensions on upload. I would suggest adding a new section to config/statamic/assets.php right underneath Image Manipulation Presets. If (for many people) resizing actions are already being run on upload, I figure its not too much more work to also set a maximum pixel dimension size here as well?

Alternatively the keep_original flag previously suggested being added to the presets could also work well?

I ended up writing a local applescript that takes all images, resizes them to maximum dimensions, runs them through imageoptim. But it fills up repo's (due to the duplication) and is obviously a bit clunky for something that's built into many CMS's (Wordpress, CraftCMS, Drupal, Webflow, Squarespace etc - aware Statamic is smaller than these).

Seems this has been an issue since v2 days, and was suggested that an Idea be posted here;
statamic/v2-hub#1528 (comment)

@jesseleite
Copy link
Member

It would be great if images could be resized to a definable maximum dimensions on upload

This is coming in 3.4 statamic/cms#6040 🤘

CleanShot 2023-01-16 at 14 08 40

Alternatively the keep_original flag previously suggested being added to the presets could also work well

With this new implementation, a keep_original flag is not needed. If you want to keep your original unmodified image, then instead of processing uploads directly, you can select which preset manipulations(s) you wish to warm post-upload.

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

2 participants