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.