Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/modernamusements/modern-amusement-image-optimizer/archive/refs/heads/main.zipSmart on-upload WebP/AVIF optimization with EXIF/GPS stripping, bulk CLI/REST optimization and smaller-variant serving. An improved, fully GPL "Fast Imagery".
Version: 1.0.0 · Requires: WordPress 6.0+, PHP 7.4+ · License: GPL-2.0-or-later
🇩🇪 Deutsch
ModernAmusement Image Optimizer konvertiert deine hochgeladenen Fotos direkt auf dem Server in die modernen Formate WebP und AVIF — kein Cloud-Upload, kein Lizenzschlüssel, kein externer Dienst. Die Originaldatei wird nie angefasst, und eine Variante wird nur behalten, wenn sie tatsächlich kleiner ist.
Funktionen
- Never-bigger-Garantie — eine konvertierte Variante wird verworfen, wenn sie die Minimum-Savings-Schwelle nicht schlägt. Deine Mediathek wächst nie unbeabsichtigt.
- 100 % lokal + offen — kein Lizenzserver, keine Update-Pings, keine Cloud. What you see is what runs.
- Privacy by design — EXIF, GPS und ICC-Profile werden bei Konvertierungen standardmäßig entfernt.
- Deterministisch beim Upload — die Konvertierung passiert synchron, wenn WordPress die Attachment-Metadaten erzeugt; keine fragile Hintergrund-Warteschlange.
- Bulk-Tools — alle vorhandenen Bilder in einem Klick optimieren (serverseitig, zeit-geschützt) oder via
wp ma-imgopt optimize all. - REST-Endpoint —
POST /wp-json/ma-imgopt/v1/optimize/{id}für Einzelbild-Retries. - Optional Frontend-Serving — wenn aktiviert, wird die kleinere Variante für
full-Größen-Bilder im Frontend ausgeliefert (Admin unberührt). - Hinterlässt keine Daten — zwei Optionen bei der Deinstallation.
- Übersetzungsbereit.
Installation
- Lade den Ordner
modern-amusement-image-optimizernach/wp-content/plugins/hoch (oder installiere über Plugins → Installieren). - Aktiviere das Plugin.
- Optimiere optional Format/Qualität unter Einstellungen → Image Optimizer und führe den Batch für vorhandene Bilder aus.
FAQ
Braucht es eine bestimmte PHP-Erweiterung?
Das Plugin nutzt automatisch GD oder Imagick. WebP braucht GD imagewebp (oder Imagick WEBP), AVIF braucht GD imageavif (oder Imagick AVIF). Nicht unterstützte Formate werden einfach übersprungen. Auf den meisten modernen Hosts (PHP 8.x) sind beide vorhanden.
Werden meine Originale ersetzt?
Nein. Das Original-JPEG/PNG/WebP bleibt unangetastet. Optimierte Varianten liegen daneben als -<attachment-id>-optimized.webp / -<attachment-id>-optimized.avif und werden nur ausgeliefert, wenn sie deutlich kleiner sind. Die ID im Dateinamen verhindert Kollisionen bei gleichen Basisnamen (z. B. photo.jpg und photo.png).
Warum ist mein Bild nicht kleiner? Kleine, bereits komprimierte oder in Photoshop nachbearbeitete JPEGs schlagen manchmal die Minimum-Savings-Schwelle nicht — in dem Fall wird die Variante entfernt und das Original ausgeliefert. Das ist die Never-bigger-Policy.
Wie optimiere ich vorhandene Bilder?
Einstellungen → Image Optimizer → „Optimize unprocessed images (batch)". Oder per WP-CLI: wp ma-imgopt optimize all, wp ma-imgopt stats, wp ma-imgopt reset.
Wie deaktiviere ich Serving, behalte aber Konvertierungen? Schalte „Serve optimized" in den Einstellungen aus. Konvertierungen laufen beim Upload weiter, das Frontend nutzt weiterhin Originale.
Changelog
- 1.0.0 — Erstveröffentlichung.
🇬🇧 English
ModernAmusement Image Optimizer converts your uploaded photos to modern WebP and AVIF formats right on the server - no cloud upload, no license key, no external service. The original file is never touched, and a variant is kept only when it is genuinely smaller.
Features
- Never-bigger guarantee - a converted variant is discarded unless it beats the minimum-savings threshold. Your media library never grows unintentionally.
- 100% local + open - no license server, no update pings, no cloud. What you see is what runs.
- Privacy by design - EXIF, GPS and ICC profiles are stripped from conversions by default.
- Deterministic on upload - conversion happens synchronously when WordPress creates the attachment metadata; no fragile background queue.
- Bulk tools - optimize every existing image in one click (server-side, time-guarded) or via
wp ma-imgopt optimize all. - REST endpoint -
POST /wp-json/ma-imgopt/v1/optimize/{id}for single-image retries. - Optional front-end serving - when enabled, the smaller variant is served for
full-size images on the front end (admin untouched). - No data left behind - two options on uninstall.
- Translations ready.
Installation
- Upload the
modern-amusement-image-optimizerfolder to/wp-content/plugins/(or install via Plugins → Add New). - Activate the plugin.
- Optionally tune format/quality at Settings → Image Optimizer and run the batch for existing images.
FAQ
Does it need a specific PHP extension?
The plugin uses GD or Imagick automatically. WebP needs GD imagewebp (or Imagick WEBP), AVIF needs GD imageavif (or Imagick AVIF). Unsupported formats are simply skipped. On most modern hosts (PHP 8.x) both are present.
Are my originals replaced?
No. The original JPEG/PNG/WebP stays untouched. Optimized variants live next to it as -<attachment-id>-optimized.webp / -<attachment-id>-optimized.avif and are only served when they are meaningfully smaller. The ID in the filename keeps same-basename uploads (e.g. photo.jpg and photo.png) from ever colliding.
Why is is my image not smaller? Small, already-compressed or photoshopped JPEGs sometimes don't beat the minimum-savings threshold - in that case the variant is removed and the original is served. That's the never-bigger policy.
How do I optimize existing images?
Settings → Image Optimizer → "Optimize unprocessed images (batch)". Or over WP-CLI: wp ma-imgopt optimize all, wp ma-imgopt stats, wp ma-imgopt reset.
How do I disable serving but keep conversions? Turn off "Serve optimized" in the settings. Conversions continue on upload, the front end keeps using originals.
Changelog
- 1.0.0 — Initial release.
License
GPL-2.0-or-later — see LICENSE.
Author
Shady Tawfik · https://modern-amusement.dev/de