๐Ÿ› ๏ธ Install Jpegtran, Jpegoptim, and OptiPNG on cPanel/CloudLinux

Here’s a concise and clear guide for installing jpegtran, along with jpegoptim and optipng, on a cPanel/CloudLinux server with CageFS support.

๐Ÿ“Œ Step 1: Install jpegtran via libjpeg-turbo-utils

yum install libjpeg-turbo-utils
  • This installs jpegtran, a utility used for lossless JPEG transformations.

๐Ÿ“Œ Step 2: Enable inside CageFS

If you are using CloudLinux with CageFS, make it available inside jailed users:

cagefsctl --addrpm libjpeg-turbo-utils
cagefsctl -M
cagefsctl --force-update

๐Ÿ› ๏ธ Optional: Install Additional Image Optimization Tools

โœ… Step 3: Enable EPEL repo (for tools like jpegoptim and optipng)

yum install epel-release

โœ… Step 4: Install jpegoptim โ€“ Optimize JPEG images

yum install jpegoptim

โœ… Step 5: Install optipng โ€“ Optimize PNG images

yum install optipng

โœ… Verify Installation

which jpegtran
which jpegoptim
which optipng

You should see the full path to each binary if installed correctly.

Scroll to Top