[WordPress] 外掛分享: PDEV Image Optimizer

首頁外掛目錄 › PDEV Image Optimizer
WordPress 外掛 PDEV Image Optimizer 的封面圖片
全新外掛
安裝啟用
尚無評分
剛更新
最後更新
問題解決
WordPress 6.4+ PHP 8.0+ v1.3.2 上架:2026-08-26

內容簡介

PDEV Image Optimizer 是一款免費的影像優化外掛,專為簡單有效的影像轉換而設計。它能將 WordPress 媒體庫中的影像轉換為 WebP 或 AVIF 格式,並支援自動處理新上傳的影像,讓網站載入速度更快。

【主要功能】
• 支援 WebP 和 AVIF 格式的本地轉換
• 自動轉換新上傳的影像及縮圖
• 可重新啟動的媒體庫優化
• 縮圖掃描與修復功能
• 儲存空間與傳輸節省統計
• 詳細的系統報告與故障排除指導

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.3.2) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「PDEV Image Optimizer」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

PDEV Image Optimizer was created because I needed a small image optimization plugin that simply did its job. I did not need a cloud dashboard, a subscription, or a long list of advanced settings. I also did not want basic features to stop working behind a paywall after installing the plugin.
This plugin is completely free and will remain free. There is no PRO version, no limited free plan, no account, and no feature unlock hidden in the settings.
What does the plugin do?
PDEV Image Optimizer creates WebP or AVIF copies of images from the WordPress Media Library. It can convert new uploads automatically and process an existing library in small batches that can be stopped and continued later.
You only 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 and images from the active theme should be processed.

The plugin also includes thumbnail scanning and regeneration, preview-first cleanup of obsolete PDEV-generated files, storage savings statistics, conflict detection, optional Cloudflare support, and a detailed system report for troubleshooting. The Settings overview explains failed checks and links directly to the action needed to resolve each problem.
Main features

Local WebP and AVIF conversion with Imagick or GD.
Automatic conversion of new uploads and WordPress thumbnails.
Restartable 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.
Registry-backed cleanup that previews count and size before deleting only verified .pio.webp and .pio.avif outputs, either just the obsolete ones or every generated file.
Per-image safety limits that skip unsafe files without stopping the whole batch.
Storage and estimated transfer savings statistics.
Apache/LiteSpeed .htaccess delivery and generated Nginx configuration.
General image-plugin and rewrite-rule conflict detection.
Optional Cloudflare Free-compatible cache integration.
Detailed privacy-safe system report with copy and JSON export.
Clear Settings overview with tested encoder support, server requirements, delivery status, and conflict checks.
Actionable recovery instructions and a live HTTP test for Apache/LiteSpeed and Nginx delivery.
Error history from the last 24 hours, limited to 50 entries.
No external conversion service, tracking, subscription, paywall, or PRO version.

How does it work?

WordPress stores an image such as photo.jpg and usually creates thumbnail files such as photo-768x512.jpg.
PDEV Image Optimizer uses Imagick, or GD as a fallback, to create an optimized file next to each source file. The file is named photo.jpg.webp, photo.jpg.avif, or for example photo-768x512.jpg.webp.
The original image is not deleted, renamed, or replaced. WordPress content continues to use the original URL ending in .jpg, .png, .gif, or .webp.
When a browser requests that original URL, the web server checks the browser’sAccept header. If the browser supports the selected modern format and the sidecar file exists, the server returns the WebP or AVIF file instead.
A browser without support receives the untouched original image.

On Apache and compatible LiteSpeed servers, the plugin adds a clearly marked PDEV Image Optimizer block to .htaccess inside the uploads directory. If theme image optimization is enabled, it also manages a marked block in the active theme directory. The block uses rewrite rules, sets the correct MIME type, and adds Vary: Accept so caches know that one URL can return different file formats.
On Nginx, WordPress cannot safely edit the server configuration. PDEV Image Optimizer therefore shows ready-to-copy map and location blocks in System status. A server administrator must add them to the Nginx configuration and reload Nginx.
The Settings overview includes an optional live delivery test. It creates a temporary one-pixel source and optimized sidecar inside uploads, requests the source URL with the appropriate Accept header, verifies the returned HTTP status and Content-Type, and immediately removes both test files. The test runs only when an administrator clicks Test image delivery.
Conversion and delivery are separate steps. If WebP or AVIF files exist on disk but the server rules are missing or ignored, conversion succeeded but visitors will still receive the original files. Check System status when this happens.
Server requirements
The plugin needs both an image conversion library and working web-server rules.
Installing and activating the plugin cannot add missing PHP extensions or change server configuration that your hosting provider has disabled.
Required for conversion:

WordPress 6.4 or newer.
PHP 8.0 or newer.
Imagick or GD installed and enabled in PHP.
The selected library must support the selected output format. WebP support does not automatically mean AVIF support.
The WordPress uploads directory must be writable by PHP.
Enough PHP/server memory and execution time for the size of your images.

Required for automatic delivery on Apache or LiteSpeed:

Apache-compatible rewrite support (mod_rewrite).
MIME and header support (mod_mime and 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 so the plugin can add its marked rules.
If theme images are enabled, the active theme directory and its .htaccess file 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 and the generated location block to the correct server context.
Permission to test and reload Nginx after changing its configuration.

If you use managed hosting and do not have access to these settings, ask the hosting provider whether Imagick/GD supports WebP or AVIF and whether the required Apache modules and .htaccess overrides are enabled. PDEV Image Optimizer cannot bypass server restrictions imposed by the hosting provider.
Hosting resource protection and image limits
Image conversion can use considerably more memory than the compressed source file suggests. To reduce timeouts, 503 responses, and account resource-limit errors on shared hosting, PDEV Image Optimizer applies conservative limits before and during conversion.
Default limits applied to 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.
A 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 are safety ceilings, not resource reservations. The server may enforce lower limits, and increasing a PHP or plugin limit cannot bypass the hosting account’s CPU, RAM, process, or I/O allowance.
Media Library optimization starts with one 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, and temporary HTTP 409, 429, 502, 503, and 504 responses use an increasing retry delay. Progress is saved after every attachment, so a stopped job can be continued without starting the library scan from the beginning.
One WordPress attachment can contain the original image and several thumbnail files. Processing one attachment can therefore still convert several physical files.
Thumbnail regeneration always handles one attachment per request and waits briefly before requesting the next one. Thumbnail scanning is lighter and uses batches of up to five attachments.
An image that exceeds a safety limit is not converted. It is shown as a failed item with the reason in the conversion log and error list, while the optimizer continues with the next attachment. The original image is never removed or modified. Developers can adjust the safeguards with WordPress filters, but doing so should be based on the real limits of the hosting account.
External services
Cloudflare integration is optional. When configured, PDEV Image Optimizer sends the 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 with 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 support forum for this plugin on WordPress.org: 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 topic, check Tools > Image Optimizer > System status, then copy the report or export its JSON file and include the relevant details in your forum post. The report is designed to omit URLs, credentials, personal data, full server paths, and media content.

延伸相關外掛

文章
Filter
Mastodon