OptiCraft Image Engine

By Hiral Solanki

0+ active installationsVersion 1.0.0

Convert, compress, and resize Media Library images to WebP/AVIF without changing URLs. Bulk optimize, back up, and restore anytime.

Description

OptiCraft automatically converts, compresses, and resizes the images in your Media Library (JPEG, PNG, GIF) to modern WebP and AVIF formats — without breaking a single existing link. It works on brand-new uploads and on your entire existing image library, keeps a full backup of every original file, and lets you undo any optimization at any time.

Key Features

  • Automatic optimization on upload — new images are converted the moment they’re added to the Media Library (optional).
  • Bulk optimize your existing library — scan and process every existing image in resumable batches, with a live progress bar.
  • One-click “Optimize Now” — optimize (or re-optimize) a single image directly from its Media Library / Edit Media screen.
  • WebP and AVIF conversion — compress images and convert them to WebP, with optional AVIF generation when your server supports it.
  • Smart resizing — automatically resizes oversized images down to a configurable maximum width/height, with an option to never upscale smaller images.
  • Two delivery modes:
    • Canonical WebP — promotes the WebP file to be the attachment’s actual file/mime type, so the Media Library and every part of your site serve WebP directly. The original file is kept on disk as a safety net.
    • <picture> delivery — keeps the original file as the canonical URL and serves WebP/AVIF only to supporting browsers via <picture> markup, falling back automatically for everything else.
  • Full backups & one-click restore — every original file is backed up before it’s touched, and can be restored individually or all at once from the Restore Backups screen.
  • Optimization logs & dashboard stats — see total images, how many are optimized, pending, or failed, and how much space you’ve saved, plus a per-format breakdown of your Media Library.
  • Configurable compression — choose between Lossless, Balanced, and Aggressive presets, or set exact WebP/AVIF quality values.
  • Automatic backup cleanup — configurable retention period for old backups, with a daily cleanup cron.

How It Works

By default, OptiCraft never changes an attachment’s canonical filename/URL: it resizes the original file in place (if needed) and generates WebP/AVIF siblings next to it, so anything already using that image’s URL — Gutenberg blocks, Elementor, ACF fields, WooCommerce products — keeps working with zero find-and-replace. WordPress’s own registered thumbnail sizes (including custom ones added by your theme/plugins) are regenerated for every format.

If you enable “Convert to WebP (Canonical)” in Settings, OptiCraft instead promotes the generated WebP file to be the attachment’s official file — so your Media Library shows the WebP file type and URL directly — while keeping the original JPEG/PNG/GIF safely on disk in case anything still references the old URL directly.

Requirements

  • WordPress 5.8+
  • PHP 7.4+
  • GD or Imagick (Imagick recommended, for AVIF support and EXIF metadata preservation)

Installation

  1. Upload the opticraft-image-engine folder to /wp-content/plugins/, or install directly through Plugins → Add New → Upload Plugin in wp-admin.
  2. Activate the plugin through the Plugins screen.
  3. Go to Media → OptiCraft to view the dashboard, configure Settings, and run Bulk Optimization on your existing library.

FAQ

Will this break my existing image URLs?

No. By default OptiCraft never changes an attachment’s canonical URL — it resizes the original in place and serves WebP/AVIF alongside it via <picture> markup. If you opt into “Convert to WebP (Canonical)” mode, the original file is still kept on disk, so any content with the old URL hardcoded keeps working.

Do I need Imagick, or does GD work too?

Either works. Imagick is recommended because it also supports AVIF output and EXIF/IPTC metadata preservation; GD works fine for WebP conversion and resizing.

What if I don’t like the result, or something goes wrong?

Every original file is backed up before it’s touched. Go to Restore Backups to revert a single image or all images back to their original, un-optimized state at any time.

Where are my original backups stored and who can access them?

Backups are saved under random, non-guessable filenames in a randomly named folder inside uploads/opticraft-image-engine/, protected with .htaccess, web.config and index.php guards. They are deleted after your configured retention period, via Restore Backups → Delete All Backups, or on uninstall if you enable that setting.

Can I optimize images I already uploaded before installing OptiCraft?

Yes — use the Bulk Optimization tab to scan your Media Library and process existing images in resumable batches, or use the Optimize Now button on an individual image’s Edit Media screen.

Does it support AVIF?

Yes, if your server’s Imagick or GD build supports it. OptiCraft detects this automatically and shows it under Server Compatibility on the dashboard; enable “Generate AVIF” in Settings to turn it on.

Will visitors’ browsers that don’t support WebP/AVIF break?

No. In <picture> delivery mode, unsupported browsers automatically fall back to the original image format — this is native browser behavior, not something OptiCraft has to detect server-side.

Screenshots

Changelog

1.0.0

  • Initial release.