Linux 软件免费装
Banner图

ImageWoc

开发者
更新时间 2026年9月9日 23:26
PHP版本: 8.0 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

media library webp image compression image optimization image resize

下载

0.6.0

详情介绍:

ImageWoc (Image WordPress Optimization & Conversion) processes images locally on your WordPress server. It can resize oversized uploads proportionally, convert supported source images to JPG, PNG, or WebP, control output quality, preserve transparency when possible, and keep one untouched backup of every original image for future reprocessing. A key feature is reference-safe bulk optimization. When an existing Media Library image is converted and its master filename or extension changes, ImageWoc keeps the same WordPress attachment ID and updates stored references from the old image URL to the new optimized URL. It also maps regenerated WordPress intermediate-size URLs where matching sizes exist. This helps prevent broken image references when optimized images are already used in posts, pages, Gutenberg blocks, page-builder data, widgets, templates, menus, links, and other content stored in standard WordPress posts, metadata, and options. Main features Optimization Preview / Dry Run Before changing the Media Library, ImageWoc can run a read-only preview using the current settings. The preview reports how many images would change, how many would be resized or converted, and an estimated storage reduction. No image files, attachment metadata, or stored content references are modified during the preview. Automatic and manual rollback transactions Each bulk optimization run is treated as a transaction. Before an attachment is changed, ImageWoc stores a protected snapshot of its current master file, registered WordPress intermediate sizes, attachment metadata, MIME type, and reference migration map. If a processing failure occurs after the attachment has begun changing, ImageWoc attempts to restore that snapshot automatically. The administrator can also roll back the latest bulk transaction from the ImageWoc settings screen. Manual rollback restores the pre-batch image files and WordPress metadata and reverses the stored URL replacements made by ImageWoc. Rollback runs in short resumable requests rather than one long PHP request. ImageWoc Health Scanner The read-only Health Scanner checks the Media Library for common image integrity and optimization issues, including missing master files, incomplete attachment metadata, registered intermediate sizes missing from disk, missing untouched original backups, masters larger than the configured long-side limit, output-format mismatches, and unusually large master files. Findings are grouped by severity and the scanner does not modify the Media Library. Existing Media Library / bulk optimization Stored reference updates During bulk optimization, URL replacement covers standard WordPress storage used by many themes and plugins, including: The replacement layer is serialization-aware and JSON-aware. The attachment ID remains unchanged, so integrations that reference Media Library images by attachment ID continue to reference the same attachment. Third-party plugins can store image URLs in proprietary database tables or external systems. Those stores cannot be discovered safely in a generic way, so ImageWoc exposes hooks that integrations can use to extend reference migration. Original image backups Before processing an uploaded image, ImageWoc stores one untouched copy of the source file in a protected backup area under the WordPress uploads directory. WordPress-generated thumbnails are not duplicated into the backup. When an image is optimized again later, the plugin can work from this untouched source instead of recompressing a previously optimized image. This avoids cumulative quality loss when changing dimensions, output format, or quality settings. Original backups are intentionally not deleted automatically when the plugin is uninstalled, to reduce the risk of accidental loss of source files. Image format notes Available source formats depend on the image libraries and codecs installed on the web server. Formats such as TIFF, AVIF, HEIC, and HEIF commonly require Imagick/ImageMagick with the corresponding codec support. JPEG does not support alpha transparency. ImageWoc avoids destructive transparency flattening and selects an available alpha-capable format when needed.

安装:

  1. Upload the plugin to WordPress or install it from the WordPress Plugin Directory.
  2. Activate ImageWoc from the Plugins screen.
  3. Go to Settings > ImageWoc.
  4. Enable image optimization.
  5. Set the maximum long side in pixels, output format, and quality.
  6. Save the settings.
  7. New supported uploads will be processed automatically.
  8. To optimize existing Media Library files, use the bulk optimization section on the same settings page.
Before running bulk optimization on an established production site, a complete site/database backup is recommended because existing stored image URLs may be updated.

常见问题:

Does bulk optimization break images already inserted into content?

The plugin is specifically designed to avoid that. It keeps the same attachment ID and, when the image URL changes, updates old master and matching intermediate-size URLs stored in standard WordPress content, metadata, and options. A third-party plugin may use its own proprietary database tables or an external storage service. Those locations are outside generic WordPress storage and may require an integration using the plugin's reference-update hooks.

Does resizing crop my images?

No. The configured pixel value is the maximum long side. Width and height are scaled proportionally and the image aspect ratio is preserved.

What happens to the original image?

One untouched copy is kept in the plugin backup area. WordPress thumbnails and intermediate sizes are not copied into that backup.

Are images sent to an external service?

No. Image processing is performed locally with the image capabilities available on your WordPress server.

What happens if I convert a transparent PNG or WebP to JPEG?

JPEG cannot store alpha transparency. The plugin avoids flattening transparent pixels and uses an available output format that supports transparency instead.

Are animated GIF files converted?

No. Animated GIF files are skipped to avoid losing animation frames.

Why can one server convert HEIC or TIFF while another cannot?

Those formats depend on the server image editor and installed codecs. Imagick/ImageMagick support varies between hosting environments.

Can I disable optimization without deactivating the plugin?

Yes. Disable Enable image optimization in the settings. Existing settings, backups, and logs are preserved.

更新日志:

0.6.0 0.5.1 0.5.0