Skip to content

Repository files navigation

Perxel Image Optimizer

Perxel Image Optimizer

WordPress.org plugin page

Local WebP conversion for your media library — entirely from an admin page, built for shared hosting. No third-party CDN or external service, no API key or account, free. Your images never leave your host.

  • Conversion — PHP (WP_Image_Editor → GD/Imagick). foo.jpg → foo.jpg.webp sibling. Originals are never modified.
  • Serving — a managed .htaccess block: Apache serves the .webp when the browser sends Accept: image/webp. Falls back to <img> → <picture> rewriting on nginx or when .htaccess isn't writable.
  • Bulk run — the Optimization screen summarises what will run (image count, estimated time, the settings in effect), then a background job (Action Scheduler) converts the library newest→oldest, one calendar month at a time, fast-skipping images that already have a current .webp. Pause / Resume / Cancel; progress is durable across a tab close or a mid-run kill. Optional completion email.
  • Per-attachment — Convert / Reconvert / Remove buttons in the Media list table and the attachment detail panel.
  • New uploads — converted automatically, shortly after upload.

Screenshots

Optimization: prepare screen with image count, estimated time and Background / Fast run choice

Settings: quality, sizes to convert, serving and completion email

Install

From WordPress.org: Plugins → Add New → search "Perxel Image Optimizer", or open the plugin page.

Manually:

  1. Copy this folder to wp-content/plugins/perxel-image-optimizer/ (or install the release zip).
  2. Activate Perxel Image Optimizer from the Plugins screen.
  3. Open Media → Optimization.

Admin

Media → Optimization — two screens inside a shared sidebar layout:

  • Status — the numbers at a glance (library, coverage, bandwidth saved) and a single action: Convert N images, or a success state when everything is done.
  • Settings — environment probe, conversion settings, serving toggle + self-test, the sample-based saving estimate, and the danger zone (remove all .webp, remove the .htaccess block).

Requirements

  • PHP 7.4+, WordPress 6.5+
  • GD or Imagick with WebP support (wp_image_editor_supports(['mime_type' => 'image/webp'])). The admin page hard-stops with a notice if neither is available.
  • Apache/LiteSpeed with a writable .htaccess for zero-markup serving; otherwise the <picture> fallback is used.

Data it stores

Key Where What
perxel_image_optimizer_settings option quality, sizes, toggles
perxel_image_optimizer_metrics option library totals
perxel_image_optimizer_state option resumable conversion queue
perxel_image_optimizer_serve_mode option apache / fallback / off
perxel_image_optimizer_purge option in-progress purge queue
_perxel_image_optimizer post meta per-attachment status + per-size sizes
perxel_image_optimizer_sample transient cached sample estimate

"Remove all WebP" deletes every .webp under uploads/ and clears all of the above. Uninstalling the plugin (Plugins → Delete) removes the options, post meta, and the .htaccess block, but not the .webp files — run "Remove all WebP" first if you want those gone too.

Notes

  • The .webp siblings live in uploads/. If uploads/ is tracked in git, expect a lot of new untracked files after a run.
  • No AVIF (shared-hosting encode support is unreliable). No video.

About

Converts your WordPress media library to WebP locally, on your own server.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors

Languages