BACK TO DIRECTORY

PDEV Image Optimizer – WebP & AVIF

by Grzegorz Puszka

0.0
(0 ratings)

PDEV Image Optimizer helps reduce image size and improve WordPress page load performance by converting JPEG, PNG, GIF, and WebP images locally to modern WebP or AVIF formats.

Optimize new uploads automatically or convert your existing Media Library in restartable batches. Smaller WebP and AVIF files can reduce image transfer size and improve page load performance, especially on image-heavy WordPress sites.

Images never leave your server. There are no image limits, no external optimization service, no account, no subscription, and no PRO version.

Original images remain untouched. WordPress continues using the existing image URLs while supported browsers receive optimized WebP or AVIF files automatically.

Why PDEV Image Optimizer?

  • WebP and AVIF support using Imagick or GD.
  • Faster image delivery through smaller modern image formats.
  • 100% local image optimization – images are not uploaded to an external service.
  • Unlimited images – no monthly quota or conversion credits.
  • No account or API key required for image conversion.
  • No subscription or paid plan.
  • No PRO version or feature paywall.
  • Original images are never replaced or deleted during optimization.
  • Automatic optimization of new uploads and WordPress thumbnails.
  • Bulk optimization for an existing Media Library with restartable progress.
  • Apache, LiteSpeed, and Nginx support.
  • Optional Cloudflare integration.

PDEV Image Optimizer was created as a lightweight alternative to image optimization plugins that depend on cloud dashboards, subscriptions, usage limits, or paid feature unlocks.

The goal is simple: generate modern image formats locally, reduce unnecessary image transfer, serve optimized images correctly, and provide enough diagnostics to understand when server configuration prevents optimization or delivery from working.

What does the plugin do?

PDEV Image Optimizer creates WebP or AVIF copies of images from the WordPress Media Library.

It can:

  • Automatically optimize newly uploaded images.
  • Convert an existing Media Library in small, restartable batches.
  • Process WordPress thumbnail sizes.
  • Optionally optimize supported images from the active theme.
  • Scan for missing or obsolete thumbnails.
  • Regenerate missing or all registered thumbnail sizes.
  • Preview and clean obsolete PDEV-generated optimized files.
  • Show storage savings and estimated transfer savings.
  • Detect conflicting image plugins and rewrite rules.
  • Test whether optimized images are actually delivered to visitors.
  • Generate ready-to-copy Nginx configuration.
  • Integrate optionally with Cloudflare.
  • Provide a privacy-safe system report for troubleshooting.
  • Run bulk optimization, cleanup, the delivery test, and settings changes from WP-CLI with wp pdevio.

You only need to choose:

  • WebP or AVIF as the output format.
  • Which source formats should be converted: JPEG, PNG, GIF, or WebP where applicable.
  • Conversion quality.
  • Whether new uploads should be optimized automatically.
  • Whether supported images from the active theme should also be processed.

Main features

  • Local WebP and AVIF image conversion with Imagick or GD.
  • Automatic optimization of new WordPress uploads and generated thumbnails.
  • Restartable bulk optimization of the existing Media Library.
  • Optional optimization of supported images from the active theme.
  • Thumbnail scan, missing-thumbnail repair, full regeneration, and obsolete-file cleanup.
  • Cleanup that previews count and size before deleting only files whose name and location mark them as PDEV-generated (image.jpg.pio.webp).
  • Cleanup modes for obsolete generated files or all PDEV-generated optimized files.
  • Adjustable optimization speed, from a conservative shared-hosting profile to a fast profile for a VPS or dedicated server.
  • Per-image safety limits that skip unsafe files without stopping the complete optimization job.
  • WP-CLI command wp pdevio for optimization, targeted conversion, cleanup, status, the live delivery test, and format or speed changes.
  • Storage usage and estimated transfer savings statistics.
  • Apache and LiteSpeed delivery through managed .htaccess rewrite rules.
  • Generated Nginx configuration for servers where WordPress cannot modify the web-server configuration directly.
  • General image-plugin and rewrite-rule conflict detection.
  • Optional Cloudflare Free-compatible cache integration.
  • Live HTTP delivery test for WebP and AVIF responses.
  • Detailed privacy-safe system report with copy and JSON export.
  • Tested encoder support, server requirements, delivery status, and conflict checks, summarised on the main screen and detailed under System status.
  • Actionable recovery instructions when a configuration check fails.
  • Error history from the last 24 hours, limited to 50 entries.
  • No external conversion service, telemetry, tracking, subscription, paywall, or PRO version.

How does image optimization work?

  1. WordPress stores an image such as photo.jpg and usually creates thumbnail files such as photo-768x512.jpg.
  2. PDEV Image Optimizer uses Imagick, or GD as a fallback, to create an optimized file next to each source file.
  3. The optimized file is stored as a separate WebP or AVIF sidecar, for example photo.jpg.webp, photo.jpg.avif, or photo-768x512.jpg.webp.
  4. The original image is not deleted, renamed, or replaced.
  5. WordPress content continues using the existing URL ending in .jpg, .png, .gif, or .webp.
  6. When a browser requests the original URL, the web server checks the browser’s Accept header.
  7. If the browser supports the selected modern format and the optimized sidecar exists, the server returns WebP or AVIF instead.
  8. Browsers without support receive the untouched original image.

This approach keeps existing WordPress URLs, post content, image references, and metadata unchanged.

Image delivery on Apache and LiteSpeed

On Apache and compatible LiteSpeed servers, PDEV Image Optimizer adds a clearly marked PDEV Image Optimizer block to .htaccess inside the uploads directory.

If theme image optimization is enabled, the plugin also manages a marked block inside the active theme directory.

The rules:

  • Detect WebP or AVIF browser support.
  • Serve the optimized sidecar when available.
  • Set the correct MIME type.
  • Add Vary: Accept so caches know that one URL can return different image formats.

The uploads directory and its .htaccess file must be writable when the plugin needs to add or update these rules.

Image delivery on Nginx

WordPress cannot safely edit Nginx server configuration.

PDEV Image Optimizer therefore generates ready-to-copy map and location blocks in System status.

A server administrator must:

  1. Add the generated map block to the appropriate http context.
  2. Add the generated location block to the correct server context.
  3. Test the Nginx configuration.
  4. Reload Nginx.

Conversion and delivery are separate steps. Successfully generated WebP or AVIF files do not guarantee that visitors receive them if the required server rules are missing.

Live image delivery test

The Settings overview includes an optional live delivery test.

When an administrator clicks Test image delivery, PDEV Image Optimizer:

  1. Creates a temporary one-pixel source image and optimized sidecar inside uploads.
  2. Requests the original source URL with the appropriate Accept header.
  3. Checks the returned HTTP status and Content-Type.
  4. Immediately removes both temporary test files.

A successful result confirms that the server is actually returning image/webp or image/avif.

The test runs only when an administrator starts it manually.

Server requirements

PDEV Image Optimizer needs both:

  • A working PHP image conversion library.
  • Correct web-server configuration for automatic delivery.

Installing the plugin cannot add missing PHP extensions or override restrictions imposed by your hosting provider.

Required for image conversion:

  • WordPress 6.4 or newer.
  • PHP 8.0 or newer.
  • Imagick or GD installed and enabled in PHP.
  • The selected image library must support the selected output format.
  • WebP support does not automatically mean AVIF support.
  • The WordPress uploads directory must be writable by PHP.
  • The server must provide enough memory and execution time for the images being processed.

Required for automatic delivery on Apache or LiteSpeed:

  • Apache-compatible rewrite support (mod_rewrite).
  • MIME support (mod_mime).
  • Header support (mod_headers).
  • .htaccess files must be allowed and processed for the uploads directory.
  • On Apache, this normally requires an appropriate AllowOverride setting.
  • The uploads directory or its existing .htaccess file must be writable by PHP when the plugin manages delivery rules.
  • When theme image optimization is enabled, the active theme directory must meet the same requirements.

Required for delivery on Nginx:

  • Access to the Nginx website configuration.
  • Permission to add the generated map block to the http context.
  • Permission to add the generated location block to the correct server context.
  • Permission to test and reload Nginx after changing the configuration.

If you use managed hosting and do not have access to these settings, ask your hosting provider:

  • Whether Imagick or GD supports WebP or AVIF.
  • Whether the required Apache modules are enabled.
  • Whether .htaccess overrides are allowed.

PDEV Image Optimizer cannot bypass server restrictions imposed by the hosting provider.

Hosting resource protection and image limits

Image conversion can require considerably more memory than the compressed source file size suggests.

To reduce timeouts, HTTP 503 responses, PHP crashes, and shared-hosting resource-limit errors, PDEV Image Optimizer applies conservative limits before and during conversion.

Default limits for both Imagick and GD:

  • Maximum source file size: 64 MB.
  • Maximum width or height: 16,384 pixels.
  • Maximum total image size: 25 megapixels.

Additional GD protection:

  • GD conversion uses a conservative 256 MB per-request memory budget.
  • The estimate includes decoded image pixels, the source file, current PHP memory usage, and a reserved safety margin.
  • Your hosting provider or PHP configuration may impose a lower effective limit.

Additional Imagick protection:

  • Memory limit: 128 MB.
  • Memory-map limit: 256 MB.
  • Temporary disk limit: 512 MB.
  • Processing time limit: 30 seconds.
  • Thread limit: 1 thread.

These values are safety ceilings, not resource reservations.

The server or hosting account may enforce lower limits. Increasing a PHP or plugin limit cannot bypass CPU, RAM, process, disk, or I/O restrictions imposed by the hosting provider.

Safe and restartable bulk optimization

Media Library optimization starts with one WordPress attachment per request and may use two only after several fast batches.

Slow or memory-heavy batches automatically return to one attachment.

Short pauses are added between requests. Temporary HTTP 409, 429, 502, 503, and 504 responses use an increasing retry delay.

Progress is saved after every attachment, so an interrupted optimization job can continue without rescanning the whole Media Library from the beginning.

One WordPress attachment can contain:

  • The original image.
  • Multiple registered thumbnail sizes.

Processing one attachment can therefore still convert several physical image files.

Thumbnail regeneration always handles one attachment per request and pauses briefly before requesting the next one.

Thumbnail scanning is lighter and uses batches of up to five attachments.

If an image exceeds a safety limit, it is skipped and shown as a failed item with the reason in the conversion log and error list. Optimization continues with the next attachment.

The original image is never removed or modified.

Developers can adjust the safeguards with WordPress filters, but changes should reflect the actual limits of the hosting account.

External services

PDEV Image Optimizer does not use an external service for image conversion.

Cloudflare integration is optional.

When configured, PDEV Image Optimizer sends the configured Zone ID and API token to Cloudflare to manage its own Cache Rule and purge the selected zone.

The compatibility test requests one public Media Library image using different Accept headers and stores only technical response information.

Images are not uploaded to Cloudflare by this plugin.

Cloudflare information: Terms and Privacy Policy.

Support

Support is provided only through the official WordPress.org support forum for PDEV Image Optimizer:

PDEV Image Optimizer support forum

Support is not provided by email, through the author’s website, Ko-fi, social media, private messages, or any other channel.

Please use the WordPress.org forum so questions and solutions remain public and useful to other users.

Before opening a support topic:

  1. Open Tools > Image Optimizer > System status.
  2. Review the detected configuration issues.
  3. Copy the system report or export its JSON file.
  4. Include the relevant diagnostic information in your forum post.

The support report is designed to omit URLs, credentials, personal data, full server paths, and media content.

Screenshots

WebP and AVIF optimization settings - choose output format, source formats, conversion quality, automatic optimization, and optional theme image processing.

WebP and AVIF optimization settings - choose output format, source formats, conversion quality, automatic optimization, and optional theme image processing.

Bulk Media Library optimization - convert existing WordPress images and thumbnails with restartable progress and visible error reporting.

Bulk Media Library optimization - convert existing WordPress images and thumbnails with restartable progress and visible error reporting.

Thumbnail tools - find missing or obsolete WordPress image sizes and regenerate thumbnails when needed.

Thumbnail tools - find missing or obsolete WordPress image sizes and regenerate thumbnails when needed.

Cloudflare integration - configure optional cache compatibility, test delivery, and purge cache.

Cloudflare integration - configure optional cache compatibility, test delivery, and purge cache.

System status and diagnostics - inspect WordPress, PHP, server, Imagick, GD, WebP/AVIF support, image delivery, and recent plugin errors.

System status and diagnostics - inspect WordPress, PHP, server, Imagick, GD, WebP/AVIF support, image delivery, and recent plugin errors.

Plugin Details

Active Installs
0
Total Downloads
287
Version
1.4.0
Requires WP
6.4
Requires PHP
8.0
Tested Up To
7.1
Added
2026-08-27
Last Updated
2026-09-10 7:44pm GMT

Ratings

5
0
4
0
3
0
2
0
1
0