Skip to content

Ability to optimize/replace the original image #3447

Discussion options

You must be logged in to vote

To me it seems quite trivial to do these sorts of optimisations before adding the file to the media library.

Image::load($pathToImage)->fit(Fit::Max, 2000, 2000)->optimize()->save();

See:
https://spatie.be/docs/image/v3/image-manipulations/resizing-images
https://spatie.be/docs/image/v3/image-manipulations/optimizing-images

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by freekmurze
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@freekmurze
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Labels
None yet
4 participants