P
P
Pogran2016-07-13 15:05:31
Yii
Pogran, 2016-07-13 15:05:31

How to compress an image for PageSpeed ​​from Google using yii2?

If you go to https://developers.google.com/speed/pagespeed/insights/ and check the site, it often says that there is a problem with the photo (they need to be optimized). How can this be done correctly using yii2

Answer the question

In order to leave comments, you need to log in

3 answer(s)
V
Vladimir Korovin, 2016-07-13
@Pogran

Greetings! Yes, we also run projects through the Google service. Just do not need to hang up all the tasks on yii2, or rather, even on php. Image optimization requires special tools. You don't use photoshop to edit php do you? But on the case, here is a good service, I personally repeatedly drove images under Google's check: https://tinyjpg.com/

S
semki_1, 2016-07-13
@semki_1

As an option - through Photoshop, edit and save, while saving, adjust the file size (see the optimal size-quality ratio), and for some formats, when saving, choose in the options - optimization or progressive (as far as I understand, gradual file loading).

M
Michael, 2016-07-13
@springimport

Perhaps for this it is worth making a layer with nginx which will itself give compressed images.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question