Optimizing png images with optipng for Google Page Speed / ~#root -i Optimizing png images with optipng for Google Page Speed / ~#root -i Optimizing png images with optipng for Google Page Speed / ~#root -i Optimizing png images with optipng for Google Page Speed / ~#root -i Optimizing png images with optipng for Google Page Speed / ~#root -i Optimizing png images with optipng for Google Page Speed / ~#root -i Optimizing png images with optipng for Google Page Speed / ~#root -i Optimizing png images with optipng for Google Page Speed / ~#root -i
  • RU
  • UA
  • EN
  • Create an online store
  • Documentation
  • Blog
    • Unix ОS
    • Php
    • MySQL
    • JavaScript
    • Package Managers
    • Docker
    • Seo
  • Auxiliary services
    • Short Links
    • Exchange views YouTube
  • Sign in
  • Create Account
  • Home
  • Seo
  • Optimizing png images with optipng for Google Page Speed

Optimizing png images with optipng for Google Page Speed

To optimize png images on ubuntu 14.04 we will use optipng.

Installation :

sudo apt-get install optipng

How to use :

optipng /home/user/Image/footer-logo.png -o4

Compression ratio :

Defined by the -oX attribute, where x is a number.

-o0 <=> -o1 -nx -nz
-o1 <=> [use the libpng heuristics] (1 trial)
-o2 <=> -zc9 -zm8 -zs0-3 -f0,5 (8 trials)
-o3 <=> -zc9 -zm8-9 -zs0-3 -f0,5 (16 trials)
-o4 <=> -zc9 -zm8 -zs0-3 -f0-5 (24 trials)
-o5 <=> -zc9 -zm8-9 -zs0-3 -f0-5 (48 trials)
-o6 <=> -zc1-9 -zm8 -zs0-3 -f0-5 (120 trials)
-o7 <=> -zc1-9 -zm8-9 -zs0-3 -f0-5 (240 trials)

You may need to run it with sudo in some cases.

Search in all subfolders :

It is possible to search and optimize all subfolders of a directory. We will search for all png photos and process them with the optimizer.

find /var/www/project.loc/uploads -name *.png -exec optipng -o4 '{}' \;

find - makes it possible to search for files with the desired format in a given directory.

-exec - makes it possible to perform certain manipulations with the found file.

29 May 18
766
0

Comments

Name
E-mail
Rating
Review

Other articles from the category

09 June 2020

Zero Snippet or Featured Snippet, GoogleAds Response Block Diagram

Let's decide why we need a zero snippet in GoogleAds, consider the structure of the question-answer snippet. Let's give an example in html and json schema.

13 December 2018

Analysis of the source of visitors using Sourcebuster.js or where the user came to the site from

Sometimes, it is required to keep an internal record of the source from which the user entered the site and, for example, made an order. Consider an example of how to find out where the user came to the site from. The Sourcebuster.js library will help us with this, which will let you know the sou...
29 May 2018

Optimizing jpg images with jpegoptim for Google Page Speed

You have to deal with jpeg photos that are not optimized in size. There is a simple jpegoptim optimizer that allows you to control optimization settings.

Categories

  • Unix OS
  • Php
  • MySQL
  • JavaScript
  • Package Managers
  • Docker
  • Seo

Latest comments

Добрый день, Сергей. Я на более новых версиях блют...
root-i
23.02.23
Пробовал на transmart колонке. Ничего из перечисле...
Сергей
20.02.23
HenryMit, может быть
root-i
07.02.23
Неофрейдизм — это… Определение, принципы, представ...
HenryMit
07.02.23

I share information in which I needed help and spent a lot of time figuring it out. If the information helped at least one person, then this site was not created in vain.

Thank you for the continuation of the site:
Contacts

Telegram Viber Mail

Search for articles

  • Sign in
  • Create Account

Powered by chmod -R