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.
