Оптимизиране на изображенията (png,jpg)

Идеята е да се оптимизират изображнията за по- бързо зареждане и според Google PageSpeed Insights:

find . -iname '*.jpg' -print0 | xargs -0 jpegoptim --max=90 --strip-all --preserve --totals;
find $PWD -type f -name "*.jpg*" -execdir jpegoptim -v --strip-all --max=85 --preserve '{}' \;
find . -iname '*.png' -print0 | xargs -0 optipng -o7 -preserve;

Резултата:

./images/back.jpg 85x203 24bit Adobe  [OK] 1044 --> 724 bytes (30.65%), optimized.
./images/322.jpg 100x100 24bit JFIF  [OK] 3044 --> 2666 bytes (12.42%), optimized.
./images/257.jpg 100x100 24bit JFIF  [OK] 2929 --> 2533 bytes (13.52%), optimized.
Average compression (1636 files): 48.48% (10643k)



** Processing: ./selector-arrow.png
13x10 pixels, 4 bits/pixel, 16 colors (1 transparent) in palette
Input IDAT size = 81 bytes
Input file size = 211 bytes

Trying:
  zc = 9  zm = 9  zs = 0  f = 0		IDAT size = 68
  zc = 9  zm = 8  zs = 0  f = 0		IDAT size = 68
  zc = 8  zm = 9  zs = 0  f = 0		IDAT size = 68
  zc = 8  zm = 8  zs = 0  f = 0		IDAT size = 68
  zc = 7  zm = 9  zs = 0  f = 0		IDAT size = 68
  zc = 7  zm = 8  zs = 0  f = 0		IDAT size = 68
  zc = 6  zm = 9  zs = 0  f = 0		IDAT size = 68
  zc = 6  zm = 8  zs = 0  f = 0		IDAT size = 68
  zc = 5  zm = 9  zs = 0  f = 0		IDAT size = 68
  zc = 5  zm = 8  zs = 0  f = 0		IDAT size = 68
  zc = 4  zm = 9  zs = 0  f = 0		IDAT size = 68
  zc = 4  zm = 8  zs = 0  f = 0		IDAT size = 68
  zc = 3  zm = 9  zs = 0  f = 0		IDAT size = 68
  zc = 3  zm = 8  zs = 0  f = 0		IDAT size = 68
  zc = 3  zm = 9  zs = 1  f = 0		IDAT size = 68
  zc = 3  zm = 8  zs = 1  f = 0		IDAT size = 68
                               
Selecting parameters:
  zc = 3  zm = 8  zs = 1  f = 0		IDAT size = 68

Output IDAT size = 68 bytes (13 bytes decrease)
Output file size = 198 bytes (13 bytes = 6.16% decrease)

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)
VN:F [1.9.22_1171]
Rating: +1 (from 1 vote)
Оптимизиране на изображенията (png,jpg), 5.0 out of 5 based on 1 rating

Вашият коментар

Вашият email адрес няма да бъде публикуван Задължителните полета са отбелязани с *