• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Question Server Automatic Image Compression

Pentarou

Basic Pleskian
Hello,

How do I configure my Plesk server to automatically compress images from my self-hosted CDN?

Thank you in advance!
 
I suppose that this can be reached with some special WordPress plugins for your WordPress sites hosted on Plesk.
 
Hello IgorG, and thank you kindly for your reply.

I'm currently using a WordPress plugin to do just that, but it's doing a lousy job at it, because they all want me to pay an annual bill for processing all the images on their servers. I am looking for an open source tool that I can run on my own server that automatically compresses image files or my self-hosted CDN.

I'm thinking about using a tool like jpegoptim and cronjobs,

0 2 * * 0 lockrun -Q -L .lockjpegoptim -- find <path> -iname *.jpg -exec jpegoptim --strip-all -p {} \;
0 3 * * 0 lockrun -Q -L .lockoptipng -- find <path> -iname *.png -exec optipng -o7 -preserve {} \;

This cron should only affect .JPG en .PNG images modified in the last 7 days that are stored in my CDN, so the original should be preserved.
 
Last edited:
Back
Top