Make your website faster by compressing jpeg images in Linux with jpegoptim

by Mar 6, 2020Linux, Software, Wordpress0 comments

Make your website faster by compressing jpeg images in Linux with jpegoptim

Is your  website running slow? Reducing the size of the images will speed it up and you will get higher ranking in Google and other search engines.

In this video, I show you how to speedup your WordPress website by compressing jpeg images in Linux CentOS using jpegoptim.

Commands:

yum install epel-release

yum install jpegoptim

  • To optimize all JPEG pictures recursively (In sub-folders):

find -type f -name “*.jpg” -exec jpegoptim -p {} \; To compress all JPEG pictures in one folder: jpegoptim -p *.jpg

  • To schedule the command in a cron job, put the path you want right after find:

find /home -type f -name “*.jpg” -exec jpegoptim -p {} \;

Note:  Use the above instructions at your own risk and always backup your images before performing any of these commands in case something goes wrong.

0 Comments

Submit a Comment

Your email address will not be published.

Follow Us

Pin It on Pinterest

Share This