Answer the question
In order to leave comments, you need to log in
Compressing images with the intervention image library, how to?
It is necessary to compress the images that the user uploads so that they do not weigh too much. Compress so that the image is normally readable in the block on the site and (it is about 600x600, optional). They suggested using the intervention image library, I also use laravel. Please tell me what methods can be used to reduce the size so that it is as efficient as possible and displayed normally. (before that, just resizing did)
Answer the question
In order to leave comments, you need to log in
Crop to fit - Image::make($file)->widen(600)
Compression - Image::make('public/foo.png')->encode('jpg', 75); //last digit - quality to taste.
I'll share my experience of compressing pictures... At first, I had to manually recompress all the pictures through Photoshop. By the way, the most free option (except for the cost of a license for Photoshop). But this process takes a lot of time if there are more than 10-20 pictures on the site. After all, each picture must be manually processed, and then uploaded to the site again. Such a tedious process... Now I use this service - https://optipic.io/ Saves a lot of time) Works by itself - automatically - only 1 time it needs to be connected to the site. Google is happy
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question