| 开发者 | symelo |
|---|---|
| 更新时间 | 2026年11月30日 10:35 |
| PHP版本: | 7.4 及以上 |
| WordPress版本: | 7.2 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
<picture> tags (works with every cache and CDN) or with server rules.sizes attributes from your theme's layout.wp-admin/admin-ajax.php, carrying a per-site secret, starts each background run (with WP-Cron as a fallback).uploads/symelo-images/public/ and, with <picture> delivery, your home page.uploads/symelo-images/backups/ to check that kept originals can't be downloaded (daily, and from Site Health; no longer once they were moved out of the web root).symelo_images_capability (the settings screen, bulk optimization and the REST API; optimizing and restoring single images in the media library only needs the right to edit that image, so authors can optimize their own uploads), symelo_images_engine_order, symelo_images_max_pixels, symelo_images_max_bytes, symelo_images_imagick_limits, symelo_images_pace, symelo_images_worker_budget, symelo_images_dispatch_args, symelo_images_skip_page, symelo_images_more_from_symelo, symelo_images_tabs, symelo_images_warnings, symelo_images_notes, symelo_images_system_info, symelo_images_rest_status.
Actions: symelo_images_loaded, symelo_images_register_engines (add engines with $engines->add()), symelo_images_file_optimized, symelo_images_engines_tab, symelo_images_tab_{$slug}.
Extending the plugin: engines implement Symelo\Images\Engines\EngineInterface (extend AbstractEngine) and are registered on symelo_images_register_engines; each says which tasks it can do on this server and gives a rank per task for the automatic order. Add-ons check SYMELO_IMAGES_API_VERSION (1.0). The plugin's docs/extending.md documents every hook, the engine contract and the versioning rules.
Constants: SYMELO_IMAGES_DELIVERY (picture, rewrite, none), SYMELO_IMAGES_WORKER_SPEED (fast, normal, gentle).
REST API (administrators): /wp-json/symelo-images/v1/ status, settings, optimize, restore, attachments/{id}, bulk, worker, delivery/test, folders, maintenance.
WP-CLI: wp symelo-images status|optimize|restore|run|folders. wp symelo-images run --paced follows the Background speed setting (pauses and load checks), for system cron jobs on small servers.
Add the class skip-lazy to an image to keep it from lazy loading, and no-picture to keep it out of <picture> delivery.
Updates and user guide
New versions, the changelog and the user guide are on the plugin's page: https://symelo.com/wordpress/plugins/symelo-image-optimizations
New versions come from WordPress.org, through Dashboard → Updates and WordPress's automatic updates, whether you installed the plugin from WordPress.org or from symelo.com.
Choose Media → Image Optimizations → Advanced → Background speed → Gentle. Bulk work then runs in short bursts with pauses, at the lowest priority, and waits while the server is busy. New uploads are still optimized right away. If you run the queue from a system cron job, use wp symelo-images run --paced --max-seconds=240, so it keeps those pauses too.
No. The work runs in the background in short steps. If your server blocks requests to itself and WP-Cron is off, run wp symelo-images run --paced from a system cron job.
Yes, as long as "Keep the originals" is on: restore single images in the media library, or everything under Advanced.
Your server's Imagick and GD can't write AVIF. Ask your host for PHP 8.1 or newer with AVIF support in GD, or Imagick built with AVIF support. The Engines tab shows what each library can do.
No. Imagick and GD can't compress PDF files, so PDF compression is shown as unavailable and PDFs are left as they are.
No. It only uses PHP's image libraries (Imagick and GD), which WordPress uses too.
No. All compression and conversion happens on your server, and the plugin only sends requests to your own site (see "External services" above).
<picture> delivery and whole-page lazy loading use WordPress's template enhancement output buffer, so they need WordPress 6.9 or newer. On older versions the Delivery tab says so, and server rules still work.