Python project

WebP Convert: Local Image Optimizer for CMS Sites

A small command-line tool that batch-converts JPEG, PNG and TIFF images to web-ready WebP on your own machine, so the CMS doesn't have to.

Year
2026
Client
Personal project (open source, MIT)
Role
Author
  • Python
  • Linux
View on GitHub (opens in a new tab)

The challenge

On WordPress sites I kept reaching for plugins just to produce WebP images, and on Drupal I kept seeing the same pattern: clients uploading huge JPEGs and PNGs straight from a camera or a designer, and the CMS left to resize and convert them on the fly.

Why should the CMS always do the heavy lifting? Every conversion plugin and image pipeline adds weight, processing and another thing to maintain, and the oversized originals still sit on the server.

What I did

  • Flipped the workflow: convert images to WebP before they go into the CMS, and upload the small files directly.
  • Wrote a dependency-light Python script (just Pillow) that works on macOS and Linux: drop images into input/, run it, pick a quality.
  • Quality presets from 90 down to 10, or every preset at once to compare, with a size report per file and per quality.
  • Strips EXIF metadata (camera, date, GPS) but keeps the colour profile, keeps PNG transparency, and never deletes originals: they move to input/done/.
  • Everything runs locally: no accounts, no upload limits, and images never leave your machine.

The result

Sites ship with smaller images and fewer plugins, and the CMS stores the optimised WebP files instead of oversized originals. It's open source under the MIT licence on GitHub.

Related projects

Have a project like this in mind?

Whether it's a new build, a migration, or something that needs rescuing, I'd like to hear about it.