EWWW Image Optimizer 8.9.2 has 10 actions and 153 filters, read directly from its source code on Nov 17, 2026. The list updates automatically when a new version is released.
How to use these hooks
Actions let you run your own code at a specific moment. Filters let you change a value before the plugin uses it. Put your code in a child theme's functions.php or a code-snippets plugin, never in the plugin's own files, because updates overwrite them.
// Run your own code when EWWW Image Optimizer fires an action
add_action( 'ewww_image_optimizer_after_optimize_attachment', function( $attachment_id, $meta ) {
// Your code runs here.
}, 10, 2 );
// Change a value EWWW Image Optimizer is about to use
add_filter( 'exactdn_skip_image', function( $value, $src, $tag ) {
// Change $value here.
return $value;
}, 10, 3 );Parts of a name in {braces} are filled in at runtime (for example a post type or field ID). Choose Example on any hook for a ready-to-edit snippet.
All hooks
-
exactdn_skip_image
filter/** * Allow specific images to be skipped by ExactDN. */ apply_filters( 'exactdn_skip_image', false, $src, $tag ); -
image_make_intermediate_size
filter/** * This filter is documented in wp-includes/class-wp-image-editor-gd.php */ apply_filters( 'image_make_intermediate_size', $filename ); -
eio_do_js_webp
filter/** * Allow pre-empting JS WebP by page. */ apply_filters( 'eio_do_js_webp', $do_webp, parent::$request_uri ); -
exactdn_skip_page
filter/** * Allow pre-empting the parsers by page. */ apply_filters( 'exactdn_skip_page', false, parent::$request_uri ); -
eio_do_lazyload
filter/** * Allow pre-empting Lazy Load by page. */ apply_filters( 'eio_do_lazyload', true, parent::$request_uri ); -
/** * Set a maximum for a query, 1k less than WPE's 16k limit, just to be safe. */ apply_filters( 'ewww_image_optimizer_max_query_length', $max_query_length ); -
exactdn_version_string
filter/** * Allows a custom version string for resources that are missing one. */ apply_filters( 'exactdn_version_string', $modified ); -
eio_do_picture_webp
filter/** * Allow pre-empting <picture> WebP by page. */ apply_filters( 'eio_do_picture_webp', true, parent::$request_uri ); -
/** * Allow altering the metadata or performing other actions before the plugin * processes an attachement. */ apply_filters( 'ewww_image_optimizer_resize_from_meta_data', $meta, $file_path, $new_image ); -
exactdn_post_image_args
filter/** * Filter the array of ExactDN arguments added to an image. By default, only * includes width and height values. */ apply_filters( 'exactdn_post_image_args', $args, \compact( 'tag', 'src', 'src_orig', 'width', 'height' ) ); -
exactdn_pre_args
filter/** * Documented in generate_url, in this case used to detect images that should * bypass srcset fill. */ apply_filters( 'exactdn_pre_args', array( 'test' => 'lazy-test' ), $src, null ); -
exactdn_skip_for_url
filter/** * Allow specific URLs to avoid going through ExactDN. */ apply_filters( 'exactdn_skip_for_url', false, $url, array(), null ); -
exactdn_srcset_multipliers
filter/** * Filter the multiplier ExactDN uses to create new srcset items. Return false * to short-circuit and bypass auto-generation. */ apply_filters( 'exactdn_srcset_multipliers', array( .1, .2, .3, .4, .5, .6, .7, .8, .9, 1, 450 ) ); -
eio_allow_admin_js_webp
filter/** * Provide plugins a way of running JS WebP for images in the WordPress Admin, * usually for admin-ajax.php. */ apply_filters( 'eio_allow_admin_js_webp', false ); -
eio_allow_admin_lazyload
filter/** * Provide plugins a way of running Lazy Load for images in the WordPress * Admin, usually for admin-ajax.php. */ apply_filters( 'eio_allow_admin_lazyload', false ); -
eio_allow_admin_picture_webp
filter/** * Provide plugins a way of running <picture> WebP for images in the WordPress * Admin, usually for admin-ajax.php. */ apply_filters( 'eio_allow_admin_picture_webp', false ); -
eio_s3_active
filter/** * Allow third-party offload plugins to mark the site as serving media from * S3-compatible storage. */ apply_filters( 'eio_s3_active', $this->s3_active ); -
eio_s3_object_prefix
filter/** * Allow third-party offload plugins to declare an S3 object prefix. */ apply_filters( 'eio_s3_object_prefix', $this->s3_object_prefix ); -
/** * Allow third-party offload plugins to declare that offloaded URLs contain a * numeric object versioning segment (8 or 14 digits) that must be stripped * before resolving URLs to local paths. */ apply_filters( 'eio_s3_object_versioning_enabled', $this->s3_object_version ); -
/** * Filters the dimensions to used for resizing uploaded images. */ apply_filters( 'ewww_image_optimizer_resize_dimensions', array( $maxwidth, $maxheight ), $file ); -
/** * Add query strings to ExactDN URL. By default, ExactDN doesn't support query * strings so we ignore them. This setting is ExactDN Server dependent. */ apply_filters( 'exactdn_add_query_string_to_domain', false, $image_url_parts['host'] ); -
/** * Provide plugins a way of running ExactDN for images in the WordPress * Dashboard (wp-admin). */ apply_filters( 'exactdn_admin_allow_image_downsize', false, \compact( 'image', 'attachment_id', 'size' ) ); -
/** * Provide plugins a way of running ExactDN for images in the WordPress * Dashboard (wp-admin). */ apply_filters( 'exactdn_admin_allow_image_srcset', false, \compact( 'image_src', 'attachment_id' ) ); -
/** * Provide plugins a way of running ExactDN for images in the WordPress * Dashboard (wp-admin). */ apply_filters( 'exactdn_admin_allow_plugin_url', false, $image ); -
exactdn_content_width
filter/** * Filter the Content Width value. */ apply_filters( 'exactdn_content_width', $content_width ); -
exactdn_image_downsize_array
filter/** * Filter the ExactDN arguments added to an image, when the image size is an * array of height and width values. */ apply_filters( 'exactdn_image_downsize_array', $exactdn_args, \compact( 'width', 'height', 'image_url', 'attachment_id' ) ); -
/** * Filter the ExactDN arguments added to an image, when that image size is a * string. Image size will be a string (e.g. "full", "medium") when it is known * to WordPress. */ apply_filters( 'exactdn_image_downsize_string', $exactdn_args, \compact( 'image_args', 'image_url', 'attachment_id', 'size', 'transform' ) ); -
/** * Provide plugins a way of preventing ExactDN from being applied to images * retrieved from WordPress Core. */ apply_filters( 'exactdn_override_image_downsize', false, \compact( 'image', 'attachment_id', 'size' ) ); -
exactdn_pre_image_url
filter/** * Filter the original image URL before it goes through ExactDN. */ apply_filters( 'exactdn_pre_image_url', $image_url, $args, $scheme ); -
exactdn_reject_https
filter/** * Tells ExactDN to ignore images that are served via HTTPS. */ apply_filters( 'exactdn_reject_https', false ); -
exactdn_srcset_fill_width
filter/** * Filter the width ExactDN will use to create srcset attribute. Return a falsy * value to short-circuit and bypass srcset fill. */ apply_filters( 'exactdn_srcset_fill_width', $width, $url ); -
exactdn_the_page
filter/** * Allow parsing the full page content after ExactDN is finished with it. */ apply_filters( 'exactdn_the_page', $content ); -
exactdn_validate_image_url
filter/** * Overwrite the results of the previous validation steps an image goes through * to be considered valid for ExactDN. */ apply_filters( 'exactdn_validate_image_url', true, $url, $parsed_url ); -
image_save_progressive
filter/** * This filter is documented in wp-includes/class-wp-image-editor-gd.php */ apply_filters( 'image_save_progressive', false, $mime_type ); -
image_strip_meta
filter/** * Filters whether to strip metadata from images when they're resized. */ apply_filters( 'image_strip_meta', $strip_meta ); -
apply_filters( 'ewww_image_optimizer_admin_permissions', '' ); -
apply_filters( 'ewww_image_optimizer_bulk_permissions', '' ); -
apply_filters( 'ewww_image_optimizer_manual_permissions', '' ); -
ewwwio_whitelabel
filterapply_filters( 'ewwwio_whitelabel', false ); -
jpeg_quality
filterapply_filters( 'jpeg_quality', 82, 'image_resize' ); -
cs_is_preview_render
filterapply_filters( 'cs_is_preview_render', false ); -
ewww_image_optimizer_bypass
filterapply_filters( 'ewww_image_optimizer_bypass', false, $path ); -
ewww_image_optimizer_timeout
filterapply_filters( 'ewww_image_optimizer_timeout', 15 ); -
apply_filters( 'ewwwio_editor_prevent_overwrite', true ); -
webp_quality
filterapply_filters( 'webp_quality', 75, 'image/webp' ); -
apply_filters( 'ewww_image_optimizer_defer_conversion', false ); -
eio_allow_restapi_parsing
filterapply_filters( 'eio_allow_restapi_parsing', false, 'js_webp' ); -
do_action( 'ewww_image_optimizer_after_optimize_attachment', $image->attachment_id, $meta ); -
apply_filters( 'ewww_image_optimizer_count_optimized_queries', 4000 ); -
apply_filters( 'ewww_image_optimizer_defer_resizing', false ); -
apply_filters( 'ewww_image_optimizer_superadmin_permissions', '' ); -
apply_filters( 'ewww_image_optimizer_update_table', true, $attachment, $opt_size, $orig_size ); -
https_local_ssl_verify
filterapply_filters( 'https_local_ssl_verify', false ); -
wpml_setting
filterapply_filters( 'wpml_setting', array(), 'language_domains' ); -
apply_filters( "{$this->identifier}_default_time_limit", $this->time_limit ); -
apply_filters( "{$this->identifier}_queue_lock_time", $this->queue_lock_time ); -
easyio_admin_permissions
filterapply_filters( 'easyio_admin_permissions', 'manage_options' ); -
apply_filters( 'eio_add_missing_width_height_attrs', $this->get_option( $this->prefix . 'add_missing_dims' ) ); -
apply_filters( 'eio_allowed_background_image_elements', array( 'div', 'li', 'span', 'section', 'a', 'rs-bg-elem' ) ); -
eio_lazy_noscript
filterapply_filters( 'eio_lazy_noscript', '<noscript>' . $ns_img->html . '</noscript>', $image_tag, $file ); -
eio_lazy_safe_domains
filterapply_filters( 'eio_lazy_safe_domains', $this->allowed_domains ); -
eio_lazy_safe_paths
filterapply_filters( 'eio_lazy_safe_paths', $safe_paths ); -
apply_filters( 'ewww_image_optimizer_api_verify_url', $url ); -
apply_filters( 'ewww_image_optimizer_backup_exclusions', $this->exclusions ); -
apply_filters( 'ewww_image_optimizer_hidpi_suffix', '@2x' ); -
apply_filters( 'ewww_image_optimizer_is_remote_file', false, $file_path, $selected_id ); -
apply_filters( 'ewww_image_optimizer_schedule', 'daily', 'ewww_image_optimizer_site_report' ); -
apply_filters( 'ewww_image_optimizer_skip_webp_rewrite', false, $image ); -
apply_filters( 'ewww_image_optimizer_stream_wrappers', $supported_wrappers ); -
apply_filters( 'ewwwio_generated_webp_image_url', $webp_url, $url ); -
ewwwio_inline_script_attrs
filterapply_filters( 'ewwwio_inline_script_attrs', $this->inline_script_attrs ); -
apply_filters( 'ewwwio_insert_body_webp_script', true ); -
apply_filters( 'exactdn_full_align_image_width', \max( 1920, $content_width ) ); -
apply_filters( 'exactdn_wide_align_image_width', \max( 1500, $content_width ) ); -
webp_allowed_domains
filterapply_filters( 'webp_allowed_domains', $this->allowed_domains ); -
webp_allowed_urls
filterapply_filters( 'webp_allowed_urls', $this->allowed_urls ); -
apply_filters( "{$this->identifier}_cron_interval", $this->cron_interval ); -
apply_filters( "{$this->identifier}_memory_exceeded", $return ); -
apply_filters( "{$this->identifier}_time_exceeded", $return ); -
do_action( "{strtolower(__NAMESPACE__)}_beacon_notice" ); -
avif_quality
filterapply_filters( 'avif_quality', 60, 'image/avif' ); -
apply_filters( 'easyio_background_image_autoscale', true ); -
easyio_verification_schedule
filterapply_filters( 'easyio_verification_schedule', 'daily', $event ); -
eio_adaptive_sharpen_radius
filterapply_filters( 'eio_adaptive_sharpen_radius', 0, $dst_w, $dst_h ); -
eio_adaptive_sharpen_sigma
filterapply_filters( 'eio_adaptive_sharpen_sigma', 1, $dst_w, $dst_h ); -
apply_filters( 'eio_adaptive_sharpen_sigma_threshold', 250000 ); -
apply_filters( 'eio_adaptive_sharpen_threshold', 1500000 ); -
apply_filters( 'eio_filter_admin_ajax_response', false ); -
eio_image_resize_filter
filterapply_filters( 'eio_image_resize_filter', $filter_name, $dst_w, $dst_h ); -
eio_image_resize_threshold
filterapply_filters( 'eio_image_resize_threshold', 2000000 ); -
eio_image_url_to_webp
filterapply_filters( 'eio_image_url_to_webp', $bg_image_urls[0] ); -
eio_lazy_bg_image_exclusions
filterapply_filters( 'eio_lazy_bg_image_exclusions', \array_merge( array( 'data:image/', 'data-no-lazy=', 'header-gallery-wrapper ', 'lazyload', 'skip-lazy', 'avia-bg-style-fixed', 'trustindex', ), $this->user_exclusions, $exclusions ) ); -
eio_lazy_exclusions
filterapply_filters( 'eio_lazy_exclusions', \array_merge( array( 'class="ls-bg', 'class="ls-l', 'class="rev-slidebg', 'data-bgposition=', 'data-envira-src=', 'data-lazy=', 'data-lazy-original=', 'data-lazy-src=', 'data-lazy-srcset=', 'data-lazyload=', 'data-lazysrc=', 'data-mk-image-src', 'data-no-lazy=', 'data-src=', 'data-srcset=', 'ewww_webp_lazy_load', 'fullurl=', 'gazette-featured-content-thumbnail', 'lazy-slider-img=', 'mgl-lazy', ... ); -
eio_lazy_fold
filterapply_filters( 'eio_lazy_fold', $this->get_option( $this->prefix . 'll_abovethefold' ) ); -
eio_lazy_iframe_exclusions
filterapply_filters( 'eio_lazy_iframe_exclusions', \array_merge( array( 'about:blank', 'data-no-lazy=', 'display:none', 'display: none', 'googletagmanager', 'lazyload', 'skip-lazy', 'wprus/', 'vimeo', ), $this->user_exclusions ), $tag ); -
eio_lazy_placeholder
filterapply_filters( 'eio_lazy_placeholder', $placeholder_src, $image_tag->html ); -
eio_lazy_responsive
filterapply_filters( 'eio_lazy_responsive', $srcset_sizes ); -
apply_filters( 'eio_ll_multiple_bg_images_for_webp', $bg_image_urls ); -
eio_rewrite_all_the_assets
filterapply_filters( 'eio_rewrite_all_the_assets', true ); -
eio_sharpen_amount
filterapply_filters( 'eio_sharpen_amount', 8, $dst_w, $dst_h ); -
eio_sharpen_radius
filterapply_filters( 'eio_sharpen_radius', 0.25, $dst_w, $dst_h ); -
eio_sharpen_sigma
filterapply_filters( 'eio_sharpen_sigma', 0.25, $dst_w, $dst_h ); -
eio_sharpen_threshold
filterapply_filters( 'eio_sharpen_threshold', 0.065, $dst_w, $dst_h ); -
eio_uncounted_lazy_images
filterapply_filters( 'eio_uncounted_lazy_images', $uncounted_images ); -
eio_use_adaptive_sharpen
filterapply_filters( 'eio_use_adaptive_sharpen', false, $dst_w, $dst_h ); -
eio_use_dcip
filterapply_filters( 'eio_use_dcip', $this->get_option( $this->prefix . 'use_dcip' ) ); -
eio_use_lqip
filterapply_filters( 'eio_use_lqip', $this->get_option( $this->prefix . 'use_lqip' ) ); -
eio_use_piip
filterapply_filters( 'eio_use_piip', $this->use_piip ); -
eio_use_siip
filterapply_filters( 'eio_use_siip', $this->get_option( $this->prefix . 'use_siip' ) ); -
eio_webp_noscript
filterapply_filters( 'eio_webp_noscript', '<noscript>' . $image . '</noscript>', $image_tag->html, $file ); -
apply_filters( 'ewww_image_optimizer_allowed_reopt', false ); -
apply_filters( 'ewww_image_optimizer_api_backup_url', $url ); -
apply_filters( 'ewww_image_optimizer_api_optimize_url', $url ); -
apply_filters( 'ewww_image_optimizer_api_quota_url', $url ); -
apply_filters( 'ewww_image_optimizer_api_reduce_url', $url ); -
apply_filters( 'ewww_image_optimizer_api_resize_url', $url ); -
apply_filters( 'ewww_image_optimizer_api_retrieve_delay', 6 ); -
apply_filters( 'ewww_image_optimizer_api_retrieve_url', $url ); -
apply_filters( 'ewww_image_optimizer_api_rotate_url', $url ); -
apply_filters( 'ewww_image_optimizer_async_disk_locking', true ); -
apply_filters( 'ewww_image_optimizer_background_optimization', ewwwio()->defer ); -
apply_filters( 'ewww_image_optimizer_backup_post_resize', false ); -
apply_filters( 'ewww_image_optimizer_bulk_restore_batch_size', 20 ); -
apply_filters( 'ewww_image_optimizer_bypass_webp', false, $file ); -
apply_filters( 'ewww_image_optimizer_cloud_based_media', $cloud_based ); -
apply_filters( 'ewww_image_optimizer_converted_filename_suffix', $this->increment ); -
apply_filters( 'ewww_image_optimizer_crop_image', false ); -
apply_filters( 'ewww_image_optimizer_filter_page_output', $buffer ); -
do_action( 'ewww_image_optimizer_image_resized', $file, $new_file ); -
apply_filters( 'ewww_image_optimizer_offloaded_media', false ); -
do_action( 'ewww_image_optimizer_post_optimization', $file, $type, $fullsize ); -
do_action( 'ewww_image_optimizer_pre_optimization', $file, $type, $fullsize ); -
apply_filters( 'ewww_image_optimizer_reduce_palette', true ); -
apply_filters( 'ewww_image_optimizer_remote_fetched', $filename, $id, $meta ); -
apply_filters( 'ewww_image_optimizer_resize_filesize_ignore', false ); -
apply_filters( 'ewww_image_optimizer_skip_local_backup', false, $file ); -
apply_filters( 'ewww_image_optimizer_webp_path', $webp_path, $file, $naming_mode ); -
ewwwio_admin_notices
actiondo_action( 'ewwwio_admin_notices' ); -
do_action( 'ewwwio_conversion_replace_url_post', $new_url, $old_url ); -
apply_filters( 'ewwwio_find_original_image_no_meta', false, $image_file ); -
ewwwio_imagick_supports_webp
filterapply_filters( 'ewwwio_imagick_supports_webp', $this->imagick_supports_webp ); -
ewwwio_js_webp_exclusions
filterapply_filters( 'ewwwio_js_webp_exclusions', \array_merge( array( 'timthumb.php?', 'wpcf7_captcha/', ), $this->user_exclusions ), $image_tag->html ); -
ewwwio_network_admin_notices
actiondo_action( 'ewwwio_network_admin_notices' ); -
apply_filters( 'ewwwio_optimize_converted_webp_images', false ); -
apply_filters( 'ewwwio_picture_webp_exclusions', \array_merge( array( 'lazyload', 'class="ls-bg', 'class="ls-l', 'class="rev-slidebg', 'data-bgposition=', 'data-envira-src=', 'data-lazy=', 'data-lazy-original=', 'data-lazy-src=', 'data-lazy-srcset=', 'data-lazyload=', 'data-lazysrc=', 'data-no-lazy=', 'data-src=', 'data-srcset=', 'fullurl=', 'gazette-featured-content-thumbnail', 'jetpack-lazy-image', 'lazy-slider-img=', 'mgl-lazy', 'timthumb.... ); -
apply_filters( 'ewwwio_primary_translated_media_id', $id ); -
ewwwio_translated_media_ids
filterapply_filters( 'ewwwio_translated_media_ids', $translations, $id ); -
apply_filters( 'ewwwio_use_original_for_webp_thumbs', true ); -
exactdn_allowed_domains
filterapply_filters( 'exactdn_allowed_domains', $this->allowed_domains ); -
apply_filters( 'exactdn_api_request_useragent', $useragent ); -
exactdn_as3cf_cname_active
actiondo_action( 'exactdn_as3cf_cname_active' ); -
exactdn_asset_domains
filterapply_filters( 'exactdn_asset_domains', $this->get_exactdn_option( 'asset_domains' ) ); -
apply_filters( 'exactdn_content_bgimage_width', $content_width, $bg_image_url ); -
exactdn_domain_mismatch
actiondo_action( 'exactdn_domain_mismatch' ); -
apply_filters( 'exactdn_et_parallax_bgimage_width', 1920, $bg_image_url ); -
apply_filters( 'exactdn_full_align_bgimage_width', 1920, $bg_image_url ); -
apply_filters( 'exactdn_personalizationdotcom_thumb_args', '', $prz_detail_matches[1] ); -
apply_filters( 'exactdn_wide_align_bgimage_width', 1500, $bg_image_url ); -
apply_filters( 'exactdn_wp_cover_parallax_bgimage_width', 1920, $bg_image_url ); -
get_attached_file
filterapply_filters( 'get_attached_file', $file_path, $id ); -
wpml_element_trid
filterapply_filters( 'wpml_element_trid', null, $id, 'post_attachment' ); -
apply_filters( 'wpml_get_element_translations', null, $trid, 'post_attachment' );
Generated from EWWW Image Optimizer's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Can't find the right hook?
We can build the customisation for you. Describe what you need: