How to speedup your WordPress website by compressing png images in Linux CentOS using optipng

by Mar 15, 2020Linux, Software, Wordpress0 comments

How to speedup your WordPress website by compressing png images in Linux CentOS using optipng

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 website by compressing png images in CentOS using optipng. 

Commands:

  • Install optipng:

yum install epel-release

yum install optipng

  • To optimize all PNG pictures recursively In sub-folders cd to the parent folder

find -type f -name “*.png” -exec optipng -p {} \;

  • To compress all PNG pictures in one folder: cd to the folder

optipng -p *.png

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

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

Disclaimer: 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. Required fields are marked *

Follow Me

Website created with DIVI. Get 10% discount with link below

Divi WordPress Theme Affiliate link

Recent Comments

    Stay Up to Date With The Latest News & Updates

    Join Our Newsletter

    Share This