Smush icon
Performance & Caching

Smush hooks reference

  • By WPMU DEV - Your All-in-One WordPress Platform
  • v4.3.7 New
  • Updated

Smush 4.3.7 has 52 actions and 145 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.

functions.phpyour child theme
// Run your own code when Smush fires an action
add_action( 'wp_smush_after_remove_file', function( $attachment_id, $file_paths, $removed ) {
	// Your code runs here.
}, 10, 3 );

// Change a value Smush is about to use
add_filter( 'wp_smush_is_smushable', function( $value, $attachment_id, $arg3 ) {
	// 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

  • core/class-helper.php line 852 · used in 2 places
    /**
     * Cache and returns the result. Also added a hook for third-party.
     */
    apply_filters( 'wp_smush_is_smushable', self::cache_set( $attachment_id, $is_smushable, 'is_smushable' ), $attachment_id, Core::$mime_types );
  • core/integrations/class-common.php line 184 · used in 2 places
    /**
     * Allows to skip a image from smushing
     */
    apply_filters( 'wp_smush_media_image', true, $image_size, $retina_file, $id );
  • core/class-hub-connector.php line 1035 · used in 2 places
    /**
     * Filter to modify auth error text.
     */
    apply_filters( 'wpmudev_hub_connector_get_auth_error', $error, self::$plugin_identifier );
  • core/integrations/class-common.php line 157
    /**
     * Allows to Enable/Disable WP Retina 2x Integration
     */
    apply_filters( 'smush_retina_images', true );
  • core/lazy-load/class-lazy-load-transform.php line 447
    /**
     * Filter to skip a single image from lazy load.
     */
    apply_filters( 'smush_skip_image_from_lazy_load', false, $src_url, $markup );
  • core/class-upload-dir.php line 124
    /**
     * Filters the Document root path used to get relative paths for webp rules.
     * Hopefully of help for debugging and SLS.
     */
    apply_filters( 'smush_webp_rules_root_path_base', $root_path );
  • core/external/wdev-logger/wdev-logger.php line 1243
    /**
     * By default, we will try to append the message to the log file. Add a filter
     * to allow third-party doing it by their self.
     */
    apply_filters( 'wdev_logger_update_file', null, $file, $message, $this->current_module );
  • core/external/hub-connector/inc/class-remote.php line 705
    /**
     * Registers a Hub api action and callback for it.
     */
    apply_filters( 'wdp_register_hub_action', array() );
  • core/wp-compat.php line 33
    /**
     * This filter is documented in wp-includes/media.php
     */
    apply_filters( 'wp_img_tag_add_auto_sizes', true );
  • core/class-helper.php line 891
    /**
     * Fires after removing a file on server.
     */
    do_action( 'wp_smush_after_remove_file', $attachment_id, $file_paths, $removed );
  • core/media/class-media-item-query.php line 180
    /**
     * Maximum number of URLs per IN() clause when resolving attachment IDs. Lower
     * this on hosts that kill long queries (e.g. WP Engine). 100 is summing to
     * good enough number of characters usually.
     */
    apply_filters( 'wp_smush_attachment_urls_chunk_size', 100 );
  • core/media/class-media-item-optimizer.php line 207
    /**
     * Fires before Smushing a file.
     */
    do_action( 'wp_smush_before_smush_attempt', $media_item->get_id(), $media_item->get_wp_metadata(), $third_party_errors );
  • core/class-helper.php line 719
    /**
     * Fire before calling wp_update_attachment_metadata.
     */
    do_action( 'wp_smush_before_update_attachment_metadata', $attachment_id, $meta );
  • core/png2jpg/class-png2jpg-optimization.php line 284
    /**
     * Filter whether to convert the PNG to JPG or not
     */
    apply_filters( 'wp_smush_convert_to_jpg', ! $media_item->is_transparent(), $id, $file, 'full' );
  • core/integrations/class-elementor-integration.php line 326
    /**
     * Filter the list of CSS properties that can contain image URLs.
     */
    apply_filters( 'wp_smush_css_image_properties', $properties );
  • core/class-helper.php line 356
    /**
     * Used internally to modify the error message
     */
    apply_filters( 'wp_smush_error', $error, $attachment_id );
  • core/class-helper.php line 781
    /**
     * Add a hook to allow 3rd party to custom the result.
     */
    apply_filters( 'wp_smush_file_exists', $file_exists, $file, $attachment_id, $should_download );
  • core/lazy-load/class-lazy-load-controller.php line 559
    /**
     * Filters the no-lazyload image.
     */
    apply_filters( 'wp_smush_filter_no_lazyload_image', $image->get_updated_markup() );
  • core/class-helper.php line 149
    /**
     * Add a filter to force cache. It might be helpful when we debug.
     */
    apply_filters( 'wp_smush_force_cache', false, $key, $group, $temp_cache );
  • core/class-helper.php line 410
    /**
     * Allows to format single item in meta.
     */
    apply_filters( 'wp_smush_format_attachment_meta_item', $value, $key );
  • core/frontend/class-frontend-controller.php line 621
    /**
     * Filter the global localization data for smush_global JS object.
     */
    apply_filters( 'wp_smush_global_localization', $data );
  • core/class-error-handler.php line 163
    /**
     * Due to performance, we do not join with table wp_posts to exclude the
     * deleted attachments, leave a filter for third-party custom it.
     */
    apply_filters( 'wp_smush_query_get_last_optimize_errors', $query );
  • core/class-optimizer.php line 73
    /**
     * Skip auto smush filter.
     */
    apply_filters( 'wp_smush_should_skip_auto_smush', false, $attachment_id );
  • core/lazy-load/class-lazy-load-helper.php line 79
    /**
     * Internal filter to disable page parsing.
     */
    apply_filters_deprecated( 'wp_smush_should_skip_parse', array( false ), '3.16.1', 'wp_smush_should_skip_lazy_load' );
  • core/frontend/class-frontend-controller.php line 287
    /**
     * Filter to allow features to save their settings.
     */
    apply_filters( 'wp_smush_sync_settings', null, $settings, $context );
  • core/external/hub-connector/inc/class-data.php line 391
    /**
     * Allows modification of the profile data.
     */
    apply_filters( 'wpmudev_api_profile_data', $profile );
  • core/external/hub-connector/inc/class-data.php line 343
    /**
     * Allows modification of the plugin data that is sent to the server.
     */
    apply_filters( 'wpmudev_api_project_data', $projects );
  • core/external/hub-connector/inc/class-data.php line 327
    /**
     * Collect extra data from individual plugins.
     */
    apply_filters( 'wpmudev_api_project_extra_data', '', $project_id );
  • core/external/wpmudev-blackfriday/includes/class-banner.php line 226
    /**
     * Filters the banner data, eg its texts or campaign URL.
     */
    apply_filters( 'wpmudev_blackfriday_banner_data', $data );
  • core/external/wpmudev-blackfriday/includes/class-banner.php line 430
    /**
     * Filters the deal price shown in the banner subtext.
     */
    apply_filters( 'wpmudev_blackfriday_deal_price', '$3.33/m' );
  • core/external/wpmudev-blackfriday/includes/class-upsell-widget.php line 125
    /**
     * Filters the upsell widget data, eg its texts or campaign URLs.
     */
    apply_filters( 'wpmudev_blackfriday_widget_data', array( 'widgets' => $widgets, 'translation_texts' => $this->translation_texts(), ) );
  • core/external/hub-connector/inc/class-api.php line 376
    /**
     * Action hook fired after the first sync is completed.
     */
    do_action( 'wpmudev_hub_connector_first_sync_completed' );
  • core/external/hub-connector/inc/class-api.php line 277
    /**
     * Filter hook to modify final API data.
     */
    apply_filters( 'wpmudev_hub_connector_get_api_data', $data );
  • core/external/hub-connector/inc/class-data.php line 149
    /**
     * Filter to modify raw membership data.
     */
    apply_filters( 'wpmudev_hub_connector_get_membership_data', $data );
  • core/external/hub-connector/inc/class-admin.php line 714
    /**
     * Filter hook to modify text string vars.
     */
    apply_filters( 'wpmudev_hub_connector_localize_text_vars', $strings, $this->get_plugin_id() );
  • core/external/hub-connector/inc/class-admin.php line 359
    /**
     * Filter hook to modify script vars based on actions.
     */
    apply_filters( 'wpmudev_hub_connector_localize_vars', $vars, $this->get_plugin_id() );
  • core/external/hub-connector/inc/class-options.php line 267
    /**
     * Filter to modify default options.
     */
    apply_filters( 'wpmudev_hub_connector_options_defaults', $options );
  • core/external/hub-connector/inc/class-remote.php line 715
    /**
     * Registers a Hub api action and callback for it.
     */
    apply_filters( 'wpmudev_hub_connector_register_action', $actions );
  • core/external/hub-connector/inc/class-api.php line 367
    /**
     * Action hook fired after a sync is completed.
     */
    do_action( 'wpmudev_hub_connector_sync_completed' );
  • core/external/plugins-cross-sell-page/core/class-rest-api.php line 169
    /**
     * Filter to modify settings rest capability.
     */
    apply_filters( 'wpmudev_pluginscrosssell_rest_settings_permission', $capable, $request );
  • core/smush/class-smush-request-guzzle-multiple.php line 166 · used in 3 places
    do_action( 'smush_http_api_debug', $response, array( 'url' => $this->get_url(), 'headers' => $this->get_api_request_headers( $file_path ), 'type' => 'POST', 'data' => "[streamed $file_path]", 'timeout' => $this->get_timeout(), 'user-agent' => $this->get_user_agent() );
  • core/background/class-background-process.php line 653 · used in 2 places
    apply_filters( "{$this->identifier}_revival_limit", 5 );
  • core/modules/async/class-async.php line 94 · used in 2 places
    do_action( "wp_async_{$this->action}", $id );
  • core/class-helper.php line 838 · used in 2 places
    apply_filters( 'wp_smush_resmush_mime_supported', in_array( $mime, Core::$mime_types, true ), $mime );
  • core/integrations/class-hummingbird-integration.php line 27 · used in 2 places
    do_action( 'wphb_clear_page_cache', $post_id );
  • core/frontend/class-frontend-controller.php line 497 · used in 2 places
    apply_filters( 'wpmudev_branding_hide_branding', false );
  • core/background/class-background-process.php line 622
    apply_filters( "{$this->identifier}_cron_interval", $minutes );
  • core/background/class-background-process.php line 555
    apply_filters( "{$this->identifier}_default_time_limit", 20 );
  • core/modules/helpers/class-mail.php line 98
    apply_filters( "{$this->identifier}_get_mail_recipients", array() );
  • core/modules/helpers/class-mail.php line 65
    apply_filters( "{$this->identifier}_mail_admin_id", 0 );
  • core/modules/helpers/class-mail.php line 123
    apply_filters( "{$this->identifier}_mail_attributes", $mail_attributes );
  • core/background/class-background-process.php line 285
    apply_filters( "{$this->identifier}_memory_exceeded", $return );
  • core/modules/helpers/class-mail.php line 159
    apply_filters( "{$this->identifier}_noreply_email", null );
  • core/background/class-async-request.php line 108
    apply_filters( "{$this->identifier}_process_headers", $headers );
  • core/background/class-background-process.php line 304
    apply_filters( "{$this->identifier}_time_exceeded", $return );
  • core/background/class-async-request.php line 126
    apply_filters( 'https_local_ssl_verify', false );
  • image_smushed

    action
    core/bulk/class-bulk-optimize.php line 45
    do_action( 'image_smushed', $attachment_id, $this->compile_stats( $attachment_id ) );
  • core/integrations/class-litespeed-cache-integration.php line 18
    do_action( 'litespeed_purge_post', $post_id );
  • core/integrations/class-litespeed-cache-integration.php line 22
    do_action( 'litespeed_purge_url', $url );
  • core/modules/async/class-abstract-async.php line 183
    apply_filters( 'smush_async_time_out', 0 );
  • core/parser/class-element.php line 284
    apply_filters_deprecated( 'smush_cdn_bg_image_tag', array( $updated ), '3.16.0', 'wp_smush_updated_element_markup' );
  • core/parser/class-element.php line 283
    apply_filters_deprecated( 'smush_cdn_image_tag', array( $updated ), '3.16.0', 'wp_smush_updated_element_markup' );
  • core/lazy-load/class-lazy-load-controller.php line 378
    apply_filters( 'smush_lazy_load_script_options', array( 'autoResizingEnabled' => $this->settings->is_auto_resizing_active(), 'autoResizeOptions' => array( 'precision' => 5, 'skipAutoWidth' => true, 'cdnBaseURL' => $cdn_helper->is_cdn_active() ? $cdn_helper->get_cdn_base_url() : '', ), ) );
  • core/srcset/class-srcset-helper.php line 175
    apply_filters( 'smush_skip_adding_srcset', false, $src_url, $image_markup );
  • core/lazy-load/class-lazy-load-transform.php line 167
    apply_filters( 'smush_skip_iframe_from_lazy_load', false, $src, $iframe );
  • core/external/wdev-logger/wdev-logger.php line 1036
    apply_filters( 'wdev_logger_get_file', $file, $this->current_module, $this->modules[ $this->current_module ] );
  • core/external/wdev-logger/wdev-logger.php line 500
    apply_filters( "wdev_logger_get_option_{$name}", $value, $this->current_module, $this->option );
  • core/external/wdev-logger/wdev-logger.php line 1137
    apply_filters( 'wdev_logger_level_can_do', $can_do, $level, $type, $checking_debug_log_level );
  • core/external/wdev-logger/wdev-logger.php line 1097
    apply_filters( 'wdev_logger_should_log', $do_log, $this->current_module, $message );
  • core/srcset/class-srcset-helper.php line 98
    apply_filters( 'wp_calculate_image_srcset', array(), $size_array, $image_src, $image_meta, $attachment_id );
  • core/class-helper.php line 601
    apply_filters( 'wp_smush_admin_cap', $capability );
  • core/media-library/class-media-library-watcher.php line 32
    do_action( 'wp_smush_after_attachment_upload', $attachment_id );
  • core/backups/class-backups.php line 193
    do_action( 'wp_smush_after_restore_backup', $restored, $backup_file_path, $attachment_id, $file_path );
  • core/png2jpg/class-png2jpg-optimization.php line 637
    do_action( 'wp_smush_after_restore_png_jpg', $media_item, $jpg_paths, $jpg_urls );
  • core/media-library/class-media-library-scanner.php line 36
    do_action( 'wp_smush_after_scan_library' );
  • core/media-library/class-media-library-scanner.php line 32
    apply_filters( 'wp_smush_after_scan_library_slice', $slice_data, $slice, $slice_size );
  • core/media/class-media-item-optimizer.php line 251
    do_action( 'wp_smush_after_smush_file', $media_item->get_id(), $media_item->get_wp_metadata(), $optimized ? array() : $this->get_errors() );
  • core/media/class-media-item-optimizer.php line 239
    do_action( 'wp_smush_after_smush_successful', $media_item->get_id(), $media_item->get_wp_metadata() );
  • core/class-animated-status-controller.php line 96
    do_action( 'wp_smush_attachment_animated_status_changed', $attachment_id );
  • core/media/class-media-item-controller.php line 117
    do_action( 'wp_smush_attachment_ignored_status_changed', $attachment_id, $new_status );
  • core/parser/class-parser.php line 354
    apply_filters( 'wp_smush_background_image_quotes', array( '"', '"', ''', ''' ) );
  • core/parser/class-parser.php line 279
    apply_filters( 'wp_smush_background_images_regex', $pattern );
  • core/backups/class-backups.php line 152
    do_action( 'wp_smush_before_restore_backup', $backup_file_path, $attachment_id, $file_path );
  • core/backups/class-backups.php line 123
    do_action( 'wp_smush_before_restore_backup_attempt', $media_item->get_id() );
  • core/media-library/class-media-library-scanner.php line 19
    do_action( 'wp_smush_before_scan_library' );
  • core/media-library/class-media-library-scanner.php line 26
    apply_filters( 'wp_smush_before_scan_library_slice', array(), $slice, $slice_size );
  • core/media/class-media-item-optimizer.php line 226
    do_action( 'wp_smush_before_smush_file', $media_item->get_id(), $media_item->get_wp_metadata() );
  • core/backups/class-bulk-restore.php line 66
    do_action( 'wp_smush_bulk_restore_completed', array( 'type' => 'Bulk', 'restored_count' => $this->get_restored_count(), 'total_count' => $this->get_total_count(), 'missing_backup_count' => $this->get_error_count( 'missing_backup' ), ) );
  • core/bulk/class-bulk-optimize.php line 51
    do_action( 'wp_smush_bulk_smush_completed' );
  • core/bulk/class-bulk-smush-background-process.php line 119
    do_action( 'wp_smush_bulk_smush_dead', $this );
  • core/bulk/class-bulk-optimize.php line 27
    do_action( 'wp_smush_bulk_smush_start' );
  • core/media-library/class-media-library-last-process.php line 124
    do_action( 'wp_smush_bulk_smush_stuck', $this );
  • core/class-plugin-settings-watcher.php line 141
    do_action( 'wp_smush_cdn_activated', $new );
  • core/class-configs.php line 414
    do_action( 'wp_smush_config_applied', $config_name );
  • core/transform/class-transformer.php line 211
    apply_filters( 'wp_smush_content_transforms', array() );
  • core/class-settings.php line 1318
    apply_filters( 'wp_smush_default_size_threshold', 2560 );
  • core/modules/class-dir.php line 207
    do_action( 'wp_smush_directory_smush_start' );
  • core/class-error-handler.php line 253
    apply_filters( 'wp_smush_error_messages', array( 'missing_id' => esc_html__( 'No attachment ID was received.', 'wp-smushit' ), 'ignored' => esc_html__( 'Skip ignored file.', 'wp-smushit' ), 'animated' => esc_html__( 'Skipped animated file.', 'wp-smushit' ), 'in_progress' => esc_html__( 'File processing is in progress.', 'wp-smushit' ), 'no_file_meta' => esc_html__( 'No file data found in image meta', 'wp-smushit' ), 'skipped_filter' =>... );
  • core/frontend/class-frontend-controller.php line 210
    apply_filters( 'wp_smush_frontend_poll_data', array() );
  • core/modules/class-dir.php line 1049
    apply_filters( 'wp_smush_get_admin_path', $admin_path );
  • core/class-helper.php line 692
    apply_filters( 'wp_smush_get_attached_file', null, $attachment_id, $should_download, $should_real_path, $type );
  • core/parser/class-element.php line 115
    apply_filters( 'wp_smush_get_image_attribute_names', array( 'href', 'data-href', 'src', 'data-src', 'srcset', 'data-srcset', 'data-thumb', 'data-thumbnail', 'data-back', 'data-lazyload', 'data-lazy-src', 'data-lazy-srcset', 'data-original', 'data-bg', 'data-bg-image', 'poster', ) );
  • core/class-url-utils.php line 94
    apply_filters( 'wp_smush_get_image_dimensions', false, $image_url );
  • core/class-url-utils.php line 99
    apply_filters( 'wp_smush_get_image_dimensions_url', $image_url );
  • core/stats/class-global-stats.php line 113
    apply_filters( 'wp_smush_global_optimization_stats', array() );
  • core/stats/class-global-stats.php line 206
    apply_filters( 'wp_smush_global_stats_digest_keys', $keys, $this );
  • core/stats/class-global-stats.php line 217
    apply_filters( 'wp_smush_global_stats_digest_options', $options, $this );
  • core/cache/class-cache-helper.php line 32
    do_action( 'wp_smush_home_cache_flush_required', $url );
  • core/parser/class-parser.php line 426
    apply_filters( 'wp_smush_iframes_regex', $pattern );
  • core/media/class-media-item.php line 591
    apply_filters( 'wp_smush_image', true, $this->get_id() );
  • core/parser/class-parser.php line 229
    apply_filters( 'wp_smush_image_attributes_regex', $pattern );
  • core/smush/class-smush-optimization.php line 205
    do_action( 'wp_smush_image_optimised', $this->media_item->get_id(), $this->make_smush_meta(), $this->media_item->get_wp_metadata() );
  • core/resize/class-resize-optimization.php line 226
    do_action( 'wp_smush_image_resized', $id, $this->get_stats()->to_array() );
  • core/srcset/class-srcset-helper.php line 193
    apply_filters( 'wp_smush_image_sizes', $final_sizes, $size, $final_max_width, $original_sizes );
  • core/class-plugin-settings-watcher.php line 114
    do_action( 'wp_smush_image_sizes_added' );
  • core/media-library/class-media-library-watcher.php line 51
    do_action( 'wp_smush_image_sizes_changed', $old_sizes, $new_sizes );
  • core/class-plugin-settings-watcher.php line 110
    do_action( 'wp_smush_image_sizes_deleted' );
  • core/class-plugin-settings-watcher.php line 106
    do_action( 'wp_smush_image_sizes_updated', $old_settings, $settings );
  • core/parser/class-parser.php line 66
    apply_filters( 'wp_smush_image_urls_regex', $pattern );
  • core/parser/class-parser.php line 157
    apply_filters( 'wp_smush_images_from_content_regex', $pattern );
  • core/class-settings.php line 1156
    apply_filters( 'wp_smush_large_file_cut_off', 32 * 1024 * 1024 );
  • core/lazy-load/class-lazy-load-transform.php line 469
    apply_filters( 'wp_smush_lazy_load_classes', $new_class_attr );
  • core/lazy-load/video-embed/class-video-embed-helper.php line 48
    apply_filters( 'wp_smush_lazy_load_embed_provider_classes', $embed_provider_classes );
  • core/lazy-load/video-embed/class-vimeo-embed.php line 201
    apply_filters( 'wp_smush_lazy_load_oembed_api_timeout', 15, $this->get_video_id(), $this->embed_url );
  • core/class-plugin-settings-watcher.php line 128
    do_action( 'wp_smush_lazy_load_updated', $old_settings, $settings );
  • core/lazy-load/class-lazy-load-video-embed.php line 214
    apply_filters( 'wp_smush_lazy_load_video_aspect_ratio', $aspect_ratio, $this->get_embed_provider(), $this->iframe_element );
  • core/lazy-load/class-lazy-load-video-embed.php line 348
    apply_filters( 'wp_smush_lazy_load_video_dimensions', $video_dimensions, $iframe_element );
  • core/lazy-load/class-lazy-load-video-embed.php line 330
    apply_filters( 'wp_smush_lazy_load_video_player_button', $player_button, $iframe_element );
  • core/lazy-load/class-lazy-load-video-embed.php line 238
    apply_filters( 'wp_smush_lazy_load_video_thumbnail_url', $video_thumbnail_url, $this->get_embed_provider(), $this->iframe_element );
  • core/lazy-load/class-lazy-load-video-embed.php line 192
    apply_filters( 'wp_smush_lazy_load_video_wrapper_markup_after', $wrapper_markup_after, $embed_provider, $this->iframe_element );
  • core/lazy-load/class-lazy-load-video-embed.php line 183
    apply_filters( 'wp_smush_lazy_load_video_wrapper_markup_before', $wrapper_markup_before, $embed_provider, $this->iframe_element );
  • core/lazy-load/video-embed/class-vimeo-embed.php line 75
    apply_filters( 'wp_smush_lazy_load_vimeo_id_regex', self::$video_id_regex );
  • core/lazy-load/video-embed/class-vimeo-embed.php line 242
    apply_filters( 'wp_smush_lazy_load_vimeo_retina_ratio', null, $width, $height );
  • core/lazy-load/video-embed/class-vimeo-embed.php line 182
    apply_filters( 'wp_smush_lazy_load_vimeo_thumbnail_sizes', $thumb_sizes, $this->get_video_id(), $this->embed_url );
  • core/lazy-load/video-embed/class-youtube-embed.php line 98
    apply_filters( 'wp_smush_lazy_load_youtube_id_regex', self::$video_id_regex );
  • core/lazy-load/video-embed/class-youtube-embed.php line 227
    apply_filters( 'wp_smush_lazy_load_youtube_thumbnail_sizes', $thumb_sizes, $this->get_video_id(), $this->embed_url );
  • core/lazy-load/video-embed/class-youtube-embed.php line 105
    apply_filters( 'wp_smush_lazy_load_youtube_video_id', $video_id, $this->embed_url );
  • core/lazy-load/class-lazy-load-transform.php line 194
    apply_filters( 'wp_smush_lazyload_excluded_keywords', array_unique( $exclude_keywords ) );
  • core/lazy-load/class-lazy-load-transform.php line 433
    apply_filters( 'wp_smush_lazyload_image_tag_names', $image_tag_names );
  • core/lazy-load/video-embed/class-vimeo-embed.php line 279
    apply_filters( 'wp_smush_lazyload_vimeo_oembed_api_url', $oembed_api_url, $this->get_video_id(), $this->embed_url );
  • core/class-core.php line 301
    apply_filters( 'wp_smush_localize_script_messages', $wp_smush_msgs );
  • core/frontend/class-frontend-controller.php line 558
    apply_filters( 'wp_smush_localize_ui_script_data', $script_data, $page_slug );
  • core/frontend/class-frontend-controller.php line 557
    apply_filters( "wp_smush_localize_ui_script_data_{str_replace('-','_',$page_slug)}", $script_data );
  • core/srcset/class-srcset-helper.php line 180
    apply_filters( 'wp_smush_max_image_width', 0, $content_width );
  • core/class-stats.php line 111
    apply_filters( 'wp_smush_max_rows', 5000 );
  • core/media/class-media-item.php line 930
    apply_filters( 'wp_smush_media_item_size', $size, $key, $metadata, $this );
  • core/class-plugin-settings-watcher.php line 123
    do_action( 'wp_smush_membership_status_changed' );
  • core/stats/class-global-stats.php line 122
    apply_filters( 'wp_smush_optimization_global_stats_instance', new Media_Item_Optimization_Global_Stats(), $optimization_key );
  • core/media/class-media-item-optimizer.php line 75
    apply_filters( 'wp_smush_optimizations', array(), $this->media_item );
  • core/frontend/class-frontend-controller.php line 784
    apply_filters( 'wp_smush_pages', $pages );
  • core/smush/class-smusher-options-provider.php line 32
    apply_filters( 'wp_smush_parallel_optimization', WP_SMUSH_PARALLEL );
  • wp-smush.php line 354
    do_action( 'wp_smush_plugin_activated' );
  • core/png2jpg/class-png2jpg-optimization.php line 347
    do_action( 'wp_smush_png_jpg_converted', $media_item->get_id(), $media_item->get_wp_metadata(), $media_item_stats ? $media_item_stats->to_array() : array(), $png_file_paths );
  • core/png2jpg/class-png2jpg-optimization.php line 436
    do_action( 'wp_smush_png_jpg_size_converted', $media_item->get_id(), $media_item_size->get_key(), $size_stats->to_array() );
  • core/png2jpg/class-png2jpg-optimization.php line 403
    apply_filters( 'wp_smush_png2jpg_allow_larger_converted_file', false );
  • core/cache/class-cache-helper.php line 28
    do_action( 'wp_smush_post_cache_flush_required', $post_id );
  • core/transform/class-transformer.php line 237
    do_action( 'wp_smush_post_transform_page', $parsed_page );
  • core/smush/class-smusher.php line 501
    apply_filters( 'wp_smush_pre_image_write', false, $file_path, $image );
  • core/transform/class-transformer.php line 228
    do_action( 'wp_smush_pre_transform_page', $parsed_page );
  • core/class-stats.php line 110
    apply_filters( 'wp_smush_query_limit', 3000 );
  • core/resize/class-file-resizer.php line 105
    apply_filters( 'wp_smush_resize_allow_larger_resized_file', false );
  • core/resize/class-resize-helper.php line 19
    apply_filters( 'wp_smush_resize_sizes', array( 'width' => empty( $dimensions['width'] ) ? 0 : (int) $dimensions['width'], 'height' => empty( $dimensions['height'] ) ? 0 : (int) $dimensions['height'], ), $file_path, $attachment_id );
  • core/class-plugin-settings-watcher.php line 102
    do_action( 'wp_smush_resize_sizes_updated', $old_settings, $settings );
  • core/resize/class-resize-optimization.php line 117
    apply_filters( 'wp_smush_resize_uploaded_image', $this->_should_optimize(), $this->media_item->get_id(), $this->get_savings_meta() );
  • core/transform/class-transformer.php line 163
    apply_filters( 'wp_smush_rest_content_fields', array( 'excerpt', 'content' ) );
  • core/media-library/class-media-library-scanner.php line 29
    apply_filters( 'wp_smush_scan_library_slice_handle_attachment', $slice_data, $attachment_id, $slice, $slice_size );
  • core/class-settings.php line 414
    apply_filters( 'wp_smush_settings', $settings );
  • core/class-plugin-settings-watcher.php line 98
    do_action( 'wp_smush_settings_deleted' );
  • core/class-plugin-settings-watcher.php line 94
    do_action( 'wp_smush_settings_updated', $old_settings, $settings );
  • core/class-url-utils.php line 153
    apply_filters( 'wp_smush_should_fetch_external_image_dimensions', false, $image_url );
  • core/lazy-load/class-lazy-load-video-embed.php line 64
    apply_filters( 'wp_smush_should_lazy_load_video', $can_lazy_load, $embed_provider, $this->iframe_element );
  • core/transform/class-transformation-controller.php line 96
    apply_filters( 'wp_smush_should_parse_content', $should_parse, $content );
  • core/media/class-media-item-optimizer.php line 181
    apply_filters( 'wp_smush_should_resmush', $should_reoptimize, $this->media_item->get_id() );
  • core/lazy-load/class-lazy-load-helper.php line 81
    apply_filters( 'wp_smush_should_skip_lazy_load', $skip_lazyload );
  • core/transform/class-transformation-controller.php line 54
    apply_filters( 'wp_smush_should_transform_page', $should_transform );
  • core/transform/class-transformation-controller.php line 124
    apply_filters( 'wp_smush_should_transform_rest', $should_transform_rest, $response, $request );
  • core/modules/class-dir.php line 1117
    apply_filters( 'wp_smush_skip_folder', $skip, $path );
  • core/class-animated-status-controller.php line 71
    apply_filters( 'wp_smush_skip_image_animation_check', false, $attachment_id );
  • core/png2jpg/class-png2jpg-controller.php line 241
    apply_filters( 'wp_smush_skip_image_transparency_check', false, $attachment_id );
  • core/bulk/class-background-bulk-smush-controller.php line 85
    apply_filters( 'wp_smush_stop_background_processing', false );
  • core/transform/class-transformer.php line 103
    apply_filters( 'wp_smush_transform_rest_response', $response, $request, $this );
  • core/transform/class-transformer.php line 116
    apply_filters( 'wp_smush_transform_rest_response_item', $item, $request, $this );
  • core/transform/class-transformer.php line 65
    apply_filters( 'wp_smush_transformed_page_markup', $page_markup, $parsed_page );
  • core/parser/class-element.php line 286
    apply_filters( 'wp_smush_updated_element_markup', $updated );
  • core/cache/class-cache-helper.php line 36
    do_action( 'wp_smush_url_cache_flush_required', $url );
  • core/modules/helpers/class-whitelabel.php line 228
    apply_filters( 'wp_smush_whiltelabel_replacement_terms', $replacement_terms );
  • core/modules/helpers/class-whitelabel.php line 284
    apply_filters( 'wp_smush_whitelabel_custom_made_by', '' );
  • core/lazy-load/class-lazy-load-helper.php line 185
    apply_filters( 'wp_smush_without_extension_supported_regex', $pattern );
  • core/external/wpmudev-blackfriday/campaign.php line 151
    apply_filters( 'wpmudev_blackfriday_current_date', 'd-m-Y' );
  • core/external/wpmudev-blackfriday/campaign.php line 153
    apply_filters( 'wpmudev_blackfriday_expire_date', $this->campaign_end_date );
  • core/external/wpmudev-blackfriday/campaign.php line 152
    apply_filters( 'wpmudev_blackfriday_start_date', $this->campaign_start_date );
  • core/modules/helpers/class-whitelabel.php line 82
    apply_filters( 'wpmudev_branding_hide_pro_tag', $this->is_whitelabel_enabled() );
  • core/external/plugins-cross-sell-page/app/submenus/class-cross-sell.php line 425
    apply_filters( 'wpmudev_cross_sell_plugins_list', $plugins );
  • core/external/hub-connector/inc/class-api.php line 105
    do_action( 'wpmudev_hub_connector_before_get_api_key', $force );
  • core/external/hub-connector/inc/class-remote.php line 762
    apply_filters( 'wpmudev_hub_connector_remote_verify_sign_pub_file_path', plugin_dir_path( WPMUDEV_HUB_CONNECTOR_FILE ) . 'keys/dashboard.pub' );
  • core/class-hub-connector.php line 258
    do_action( 'wpmudev_hub_connector_ui', self::$plugin_identifier );

Generated from Smush'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: