Optimizing jpg images with jpegoptim for Google Page Speed / ~#root -i Optimizing jpg images with jpegoptim for Google Page Speed / ~#root -i Optimizing jpg images with jpegoptim for Google Page Speed / ~#root -i Optimizing jpg images with jpegoptim for Google Page Speed / ~#root -i Optimizing jpg images with jpegoptim for Google Page Speed / ~#root -i Optimizing jpg images with jpegoptim for Google Page Speed / ~#root -i Optimizing jpg images with jpegoptim for Google Page Speed / ~#root -i Optimizing jpg images with jpegoptim 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 jpg images with jpegoptim for Google Page Speed

Optimizing jpg images with jpegoptim for Google Page Speed

To work with jpeg and jpg photos and optimize them on ubuntu 14.04 we need jpegoptim .

Installation :

sudo apt-get install jpegoptim

Work :

jpegoptim --strip-all /home/user/images/select.jpeg

It is possible to control the quality -S99% -m100:

jpegoptim --strip-all /home/user/images/select.jpeg -S99% -m100

The full list of flags is here :

-d путь, --dest путь (указание директории для сохранения измененных изображений)
-f, --force (принудительная оптимизация, даже если результат увеличит размер изображения)
-h (справка)
-m качество, --max =качество (уровень сжатия, 0 — 100)
-n, --noaction (не оптимизировать, только отобразить информацию)
-S размер, -- size =размер (оптимизация изображения до указанного размера в килобайтах (1 — ..) или в процентах от оригинала (1% — 99%)
-T порог, -- threshold =порог (не изменять файл если уровень сжатия ниже указанного 0 — 100%)
-o, --overwrite (перезаписывать файлы если они существуют, используется при указании опции -d)
-p, --preserve (сохранять время модификации файла)
-q, --quiet (тихий режим)
-t, --totals (отображение итогов после обработки всех файлов)
-v, --verbose (подробный режим, отображается больше информации)
--all-normal (принудительно все выходные файлы будут non-progressive)
--all-progressive (принудительно все выходные файлы будут progressive)
--strip-all (убрать все маркеры и комментарии на изображениях)
--strip-com (убрать только комментарии)
--strip-exif (убрать только EXIF маркеры)
--strip-iptc (убрать только IPTC маркеры)
--strip-icc (убарть только ICC профили)

Perhaps in some cases it will require permission to write or run via sudo .

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 *.jpeg -exec jpegoptim --strip-all '{}' \;

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
2417
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 png images with optipng for Google Page Speed

You have to deal with png photos that are not optimized in size. There is a simple optipng optimizer that allows you to manage 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