Linux 软件免费装
Banner图

PDEV Image Optimizer - WebP & AVIF

开发者 grzegorzpuszka
更新时间 2026年9月11日 03:44
捐献地址: 去捐款
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

image optimizer webp image compression image optimization avif

下载

1.2.1 1.3.2 1.4.0 1.3.0 1.3.1

详情介绍:

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? 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: You only need to choose: Main features 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: 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: Installing the plugin cannot add missing PHP extensions or override restrictions imposed by your hosting provider. Required for image conversion: Required for automatic delivery on Apache or LiteSpeed: Required for delivery on Nginx: If you use managed hosting and do not have access to these settings, ask your hosting provider: 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: Additional GD protection: Additional Imagick protection: 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: 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.

安装:

  1. Install and activate PDEV Image Optimizer.
  2. Open Tools > Image Optimizer > Settings.
  3. Review the Overview section and follow the instruction next to every yellow or red check.
  4. Choose WebP or AVIF as the output format.
  5. Select the source image formats you want to convert.
  6. Choose conversion quality.
  7. Configure automatic optimization and optional theme image optimization.
  8. Click Save settings.
  9. On Nginx, open System status > Nginx configuration, copy the generated configuration blocks to your server configuration, test it, and reload Nginx.
  10. Click Test image delivery in Overview.
  11. Confirm that the response is image/webp or image/avif.
  12. Open Media library and start optimization for existing images.
Do not enable overlapping WebP or AVIF delivery rewrite rules in multiple image optimization plugins.

屏幕截图:

  • 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.
  • 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.

升级注意事项:

1.4.0 Adds WP-CLI support (wp pdevio), an Optimization speed setting for faster bulk conversion, "Force optimize all" and "Stop" buttons on the Media Library screen, and a clearer main screen. The internal table that tracked generated files is removed and dropped automatically; generated files are now recognised by name and location. 1.3.2 Fixes an HTTP 409 failure during AVIF bulk optimization, a "cache resources exhausted" failure on large photos, and a "reserved optimized-image name" failure after moving or migrating a site. A competing rewrite rule from another plugin now warns instead of disabling PDEV delivery. 1.3.1 Fixes a fatal error in 1.3.0 caused by missing files in the release package. Update as soon as possible if you installed or updated to 1.3.0.

常见问题:

Is PDEV Image Optimizer free?

Yes. Every feature is available for free. There is no PRO version, paid feature unlock, image quota, subscription, or limited free plan.

Does the plugin upload my images to an external service?

No. Images are converted locally on your WordPress server using Imagick or GD. PDEV Image Optimizer has no image optimization API, cloud conversion service, telemetry endpoint, or analytics endpoint. Cloudflare is contacted only when an administrator explicitly configures the optional Cloudflare integration or runs its compatibility test.

Are original images deleted or replaced?

No. Original files remain untouched. PDEV Image Optimizer creates a separate optimized sidecar next to each converted source image. WordPress continues using the original image URL.

Does it optimize existing WordPress images?

Yes. The Media library optimization tool processes existing image attachments together with their registered WordPress thumbnail sizes. Work is divided into small restartable requests. A failed, oversized, or resource-intensive image is logged and skipped without stopping the remaining optimization job.

Does it optimize new uploads automatically?

Yes. Automatic optimization can be enabled for newly uploaded images and the WordPress thumbnails generated from them.

Does it support WebP?

Yes. WebP can be generated when the installed Imagick or GD library supports WebP encoding.

Does it support AVIF?

Yes, when the installed Imagick or GD build supports AVIF encoding. Many servers support WebP but were compiled without AVIF support. PDEV Image Optimizer cannot add AVIF support to PHP itself. If AVIF is unavailable, the PHP image library installed by your hosting provider must support it.

Why do I see WebP or AVIF files on disk but my website still sends JPEG or PNG?

Image conversion and image delivery are separate operations. If optimized files exist but visitors still receive JPEG or PNG, conversion is working but the required web-server delivery rules are not. On Apache or LiteSpeed, check:

  • .htaccess.
  • mod_rewrite.
  • mod_mime.
  • mod_headers.
  • AllowOverride.
On Nginx, install the generated configuration and reload the server. Also clear page, server, CDN, and browser caches before testing again.

Which image library is used?

Imagick is preferred when it supports the selected output format. GD is used as a fallback. The detailed System status report shows both libraries, their versions, supported image formats, and applicable resource limits.

How can I check whether WebP or AVIF is really being delivered?

Open Settings > Overview and click Test image delivery. PDEV Image Optimizer creates temporary local test files, requests the original URL with the selected format in the Accept header, verifies the response, and immediately removes the test files. A successful result confirms an image/webp or image/avif response. The latest result remains visible until conversion or delivery settings change. You can also verify a real image using your browser developer tools:

  1. Open the Network panel.
  2. Select an image request.
  3. Check the response Content-Type.
The URL may still end in .jpg while the response type is image/webp or image/avif. This is expected.

Why does the image URL still end in .jpg or .png?

This is intentional. PDEV Image Optimizer keeps existing WordPress URLs unchanged. The web server serves the optimized WebP or AVIF sidecar transparently when the browser supports it. This avoids replacing URLs stored in WordPress content, metadata, themes, or plugins.

Why was an image skipped because of a resource or safety limit?

The compressed file size does not indicate how much memory an image requires after decoding. PDEV Image Optimizer skips sources:

  • Larger than 64 MB.
  • Wider or taller than 16,384 pixels.
  • Larger than 25 megapixels.
GD and Imagick also have separate memory, time, disk, and thread safeguards described in Hosting resource protection and image limits. A skipped attachment remains unchanged and is listed as an error instead of silently exhausting server resources.

What are Thumbnail tools for?

Thumbnail tools scan the Media Library for:

  • Missing registered WordPress thumbnail files.
  • Obsolete files associated with image sizes that are no longer registered.
They can create missing image sizes or fully regenerate thumbnails. Thumbnail regeneration itself does not create WebP or AVIF files. Run Media Library optimization afterward.

Can it optimize images stored in my WordPress theme?

Yes. Enable active theme image optimization in Settings. The active theme directory must be readable and writable, and the web-server delivery rules must also cover that directory. Development directories including the following are excluded from scanning:

  • node_modules
  • vendor
  • .git
  • .svn

Are animated GIF files supported?

Animated GIF files are detected and skipped so animation is not replaced with a static image. A non-animated GIF can be converted when GIF is selected as a source format.

Does the plugin use additional disk space?

Yes. Original files are preserved and optimized WebP or AVIF sidecars are stored next to them. The Storage savings card shows the disk space used by optimized sidecars and estimates the smaller transfer size visitors may receive.

Can I remove generated WebP and AVIF files?

Yes. Optimized file cleanup can scan PDEV-generated optimized files before deleting anything. You can choose to remove:

  • Obsolete generated files.
  • All PDEV-generated optimized files.
The cleanup previews the number and size of files before deletion. Only files whose name and location identify them as PDEV-generated are removed, for example image.jpg.pio.webp. A real source extension must precede .pio., and the file must sit inside the uploads or active theme folder, so a file you happened to name something.pio.webp is always left alone.

What is removed when I uninstall the plugin?

Uninstalling removes:

  • Plugin options.
  • The generated-file registry table.
  • The plugin error log.
  • Managed .htaccess delivery rules.
Generated .pio.webp and .pio.avif files remain on disk by default. To remove them as well:
  • Run Optimized file cleanup and choose Scan all generated files before uninstalling, or
  • Enable Delete generated files on uninstall in the plugin settings.
On very large sites, uninstall-time deletion is a time-limited best effort and some generated files may remain. Original images are never removed.

Does it work with Cloudflare?

Yes. Local conversion and origin delivery work without a Cloudflare API connection. Without a confirmed shared-cache rule, PDEV Image Optimizer uses private-cache protection so Cloudflare does not cache the wrong image format for a shared original URL. The optional Cloudflare integration can:

  • Configure a Free-compatible Cache Rule.
  • Test image delivery.
  • Purge cache.
Automatic Cache Rule creation requires a zone-scoped API token with:
  • Cache Settings: Edit
  • Cache Purge: Purge
The standard Cloudflare WordPress token preset supports cache purge but does not include Cache Settings: Edit. Credentials can optionally be defined in wp-config.php: define( 'PDEV_IMAGE_OPTIMIZER_CLOUDFLARE_ZONE_ID', 'your-zone-id' ); define( 'PDEV_IMAGE_OPTIMIZER_CLOUDFLARE_API_TOKEN', 'your-api-token' );

Does the plugin send images or usage statistics anywhere?

No. Images are converted locally. PDEV Image Optimizer has no telemetry or analytics endpoint. Cloudflare is contacted only when an administrator explicitly provides credentials or runs the compatibility test. The Ko-fi page is opened only after the user clicks its link.

What is included in the system report?

The system report includes:

  • WordPress information.
  • PHP information.
  • Web-server information.
  • Imagick status.
  • GD status.
  • Plugin settings.
  • Image delivery status.
  • Writable-directory checks.
  • Cloudflare status.
  • Optimization statistics.
  • The latest live delivery test.
  • Detected conflicts.
  • Thumbnail status.
  • Recent plugin errors.
The report excludes:
  • Site URLs.
  • Credentials.
  • Personal data.
  • Media content.
  • Full server paths.

How long are plugin errors stored?

Only errors from the last 24 hours are shown and included in the report, with an additional maximum of 50 entries. Paths, URLs, email addresses, and image names are redacted from the support report. The log is removed when the plugin is uninstalled.

Can I use WP-CLI?

Yes. Every bulk operation is available through the wp pdevio command:

  • wp pdevio optimize [--force] [--attachments-only] [--theme-only] - convert the Media Library, plus the active theme images when that option is enabled. --force re-optimizes every image from the start. This command uses the same lock as the admin screen, so a command-line run and a browser run never process the same images at once.
  • wp pdevio convert <id>... [--force] - convert one or more attachments by ID.
  • wp pdevio cleanup [--all] [--dry-run] [--yes] - preview and delete generated optimized files. --all also removes current-format files, --dry-run only reports, --yes skips the confirmation prompt.
  • wp pdevio status - show the output format, encoder, optimization speed, optimized and pending counts, delivery-rule status, and the last delivery test.
  • wp pdevio test-delivery - run the live HTTP delivery test.
  • wp pdevio set [--format=<webp|avif>] [--speed=<conservative|balanced|fast>] - change the output format or optimization speed, exactly like the Settings screen. Run without options to print the current values.

Is there a PRO version?

No. Every feature is free and the plugin will remain free.

更新日志:

1.4.0 1.3.2 1.3.1 1.3.0 1.2.1