EWWW Image Optimizer Integration
The integration runs when EWWW_IMAGE_OPTIMIZER_VERSION is defined, the EWWW_Image_Optimizer class is available, and ewww_image_optimizer_get_option() exists. There is no manual toggle.
Conflicting settings disabled by ZiziCache
After ZiziCache settings are saved (zizi_cache_update_config:after), it disables these EWWW options:
- ewww_image_optimizer_lazy_load
- ewww_image_optimizer_picture_webp
- ewww_image_optimizer_js_webp
- ewww_image_optimizer_webp_for_cdn
- ewww_image_optimizer_auto
- ewww_image_optimizer_delay_js
Options are only turned off when they were enabled.
Compatible defaults it may set
If these EWWW options are missing, ZiziCache may set default values during coordination:
- ewww_image_optimizer_metadata_remove = true
- ewww_image_optimizer_jpg_quality = 90
- ewww_image_optimizer_png_level = 6
- ewww_image_optimizer_backup_files = true
Lazy loading
ZiziCache blocks enabling EWWW lazy load via pre_update_option_ewww_image_optimizer_lazy_load and shows an admin notice. Configure lazy loading in ZiziCache (ZiziCache → Optimization → Images).
WebP coordination
- If
ewww_image_optimizer_webpis disabled, ZiziCache enables it. - When WebP is available, it adds a
zizi_webp_eligibleflag to results fromwp_get_attachment_image_srcandwp_calculate_image_srcset. - The integration does not rewrite image URLs to .webp and does not generate
elements.
Cache invalidation on optimization
- On
ewww_image_optimizer_post_optimizationit stores stats inzizi_cache_ewww_stats. - On
ewww_image_optimizer_optimize_attachmentit deletes object-cache keys based on attachment ID. - On file optimization it deletes object-cache keys derived from the file path.
- On
ewww_image_optimizer_webp_cleanupit runswp_cache_flush(). - It does not purge HTML page cache for pages where the image appears in content.
Admin UI and visible output
On the EWWW settings page a “ZiziCache Coordination” block is rendered with coordination notes and optional stats. On the frontend for logged-in admins, ZiziCache may add an HTML comment summary if zizi_cache_ewww_stats exists.
How to work with the integration
- Configure lazy loading only in ZiziCache.
- Configure image optimization and WebP generation in EWWW. Some options are automatically disabled (see above).
- After bulk optimization, you can manually purge ZiziCache via the UI or
wp zizi-cache purge-everything.
Disable the integration (optional)
You can disable the integration via the zizi_cache_disabled_integrations filter:
add_filter('zizi_cache_disabled_integrations', function($integrations) {
$integrations[] = ZiziCachePluginsIntegrationsEWWW::class;
return $integrations;
});