Imagify Image Optimization: Optimize Images 2.3.5 has 101 actions and 177 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 Imagify Image Optimization: Optimize Images fires an action
add_action( 'action_scheduler_completed_action', function( $action_id ) {
// Your code runs here.
}, 10, 1 );
// Change a value Imagify Image Optimization: Optimize Images is about to use
add_filter( 'imagify_fill_thumbnail_data', function( $data, $response, $id, $thumbnail_path, $thumbnail_url, $size_key, $optimization_level, $metadata ) {
// Change $data here.
return $data;
}, 10, 8 );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
-
imagify_fill_thumbnail_data
filter/** * This filter is documented in /inc/classes/class-imagify-attachment.php. */ apply_filters( 'imagify_fill_thumbnail_data', $data, $response, $this->id, $thumbnail_path, $thumbnail_url, $size_key, $optimization_level, $metadata ); -
/** * Allow to prevent automatic optimization for a specific attachment. */ apply_filters( 'imagify_auto_optimize_attachment', true, $attachment_id, $metadata ); -
imagify_file_path
filter/** * This filter is documented in inc/deprecated/deprecated.php. */ apply_filters( 'imagify_file_path', $file_path ); -
/** * Fires after a scheduled action has been completed. */ do_action( 'action_scheduler_completed_action', $action_id ); -
action_scheduler_init
action/** * Fires when Action Scheduler is ready: it is safe to use the procedural API * after this point. */ do_action( 'action_scheduler_init' ); -
after_do_imagify
action/** * Fires after to optimize the Image with Imagify. */ do_action_deprecated( 'after_do_imagify', [ $this->path, $args['backup'] ], '1.9', 'imagify_before_optimize_file' ); -
/** * This hook is documented in /inc/classes/class-imagify-attachment.php. */ do_action( 'after_imagify_optimize_attachment', $this->id, $optimized_data ); -
/** * This hook is documented in /inc/classes/class-imagify-attachment.php. */ do_action( 'after_imagify_restore_attachment', $this->id ); -
before_do_imagify
action/** * Fires before to optimize the Image with Imagify. */ do_action_deprecated( 'before_do_imagify', [ $this->path, $args['backup'] ], '1.9', 'imagify_before_optimize_file' ); -
/** * This hook is documented in /inc/classes/class-imagify-attachment.php. */ do_action( 'before_imagify_optimize_attachment', $this->id ); -
/** * This hook is documented in /inc/classes/class-imagify-attachment.php. */ do_action( 'before_imagify_restore_attachment', $this->id ); -
/** * Triggered after a media auto-optimization is launched. */ do_action( 'imagify_after_auto_optimization', $attachment_id, $is_new_upload ); -
/** * Allow to overwrite the backup file if it already exists. */ apply_filters( 'imagify_backup_overwrite_backup', false, $path, $backup_path ); -
/** * Triggered before a media is auto-optimized. */ do_action( 'imagify_before_auto_optimization', $attachment_id, $is_new_upload ); -
imagify_bulk_buffer_sizes
filter/** * This filter is documented in inc/functions/i18n.php */ apply_filters( 'imagify_bulk_buffer_sizes', $l10n['bufferSizes'] ); -
/** * Fires before testing for file existence. */ do_action( 'imagify_bulk_optimize_before_file_existence_tests', $ids, $metas, $optimization_level ); -
/** * Fires before getting file IDs. */ do_action( 'imagify_bulk_optimize_files_before_get_files', $folders, $optimization_level ); -
imagify_capacity
filter/** * Filter the user capacity used to operate Imagify. */ apply_filters( 'imagify_capacity', $capacity, $describer ); -
/** * This filter is documented in /inc/functions/admin-stats.php */ apply_filters( 'imagify_count_saving_data_limit', 15000 ); -
imagify_curl_http_response
action/** * Fires after a failed curl request. */ do_action( 'imagify_curl_http_response', $url, $args, $e ); -
imagify_current_user_can
filter/** * Filter the current user ability to operate Imagify. */ apply_filters( 'imagify_current_user_can', $user_can, $capacity, $describer, $post_id ); -
imagify_fill_full_size_data
filter/** * This filter is documented in /inc/classes/class-imagify-attachment.php. */ apply_filters( 'imagify_fill_full_size_data', $data, $response, $this->id, $attachment_path, $attachment_url, 'full', $optimization_level, $metadata ); -
/** * Filter the optimization data of a specific thumbnail. */ apply_filters( 'imagify_fill_ngg_thumbnail_data', $data, $response, $this->id, $thumbnail_path, $thumbnail_url, $size_key, $optimization_level ); -
/** * This filter is documented in /inc/classes/class-imagify-attachment.php. */ apply_filters( 'imagify_fill_unauthorized_thumbnail_data', $data, $this->id, $thumbnail_path, $thumbnail_url, $size_key, $optimization_level, $metadata ); -
/** * Triggered when the consumed quota percent decreases below 80%. */ do_action( 'imagify_not_almost_over_quota_anymore', $percent, $previous_percent ); -
/** * Triggered when the consumed quota percent decreases below 100%. */ do_action( 'imagify_not_over_quota_anymore', $percent ); -
/** * Filters the post arguments used during an async request. */ apply_filters( "{$this->identifier}_post_args", $args ); -
/** * Filters the post arguments used during an async request. */ apply_filters( "{$this->identifier}_query_args", $args ); -
/** * Filters the post arguments used during an async request. */ apply_filters( "{$this->identifier}_query_url", $url ); -
/** * Allow custom processing before updating a table schema. */ do_action( 'action_scheduler_before_schema_update', $table, $this->db_version ); -
/** * Sets the order-by clause used in the action claim query. */ apply_filters( 'action_scheduler_claim_actions_order_by', 'ORDER BY priority ASC, attempts ASC, scheduled_date_gmt ASC, action_id ASC', $claim_id, $hooks ); -
/** * Filter the batch size when cleaning the queue. */ apply_filters( 'action_scheduler_cleanup_batch_size', $this->batch_size ); -
/** * Filter whether the database supports the SKIP LOCKED modifier for queries. */ apply_filters( 'action_scheduler_db_supports_skip_locked', $is_supported ); -
/** * Filter the statuses when cleaning the queue. */ apply_filters( 'action_scheduler_default_cleaner_statuses', $this->default_statuses_to_purge ); -
/** * Fires to allow extensions to verify and ensure their recurring actions are * scheduled. */ do_action( 'action_scheduler_ensure_recurring_actions' ); -
/** * Allows 3rd party code to add extra action counts (used in filters in the * list table). */ apply_filters( 'action_scheduler_extra_action_counts', $extra_actions ); -
/** * Notify 3rd party code of exceptions when deleting a completed action older * than the retention period */ do_action( "action_scheduler_failed_{$context}_action_deletion", $action_id, $e, $lifespan, count( $actions_to_delete ) ); -
/** * Runs when action execution fails. */ do_action( 'action_scheduler_failed_execution', $action_id, $e, $context ); -
/** * Runs when action validation fails. */ do_action( 'action_scheduler_failed_validation', $action_id, $e, $context ); -
action_scheduler_pre_init
action/** * Fires in the early stages of Action Scheduler init hook. */ do_action( 'action_scheduler_pre_init' ); -
/** * When an external object cache is in use, and when wp_cache_flush_runtime() * is not available, then normally the cache will not be flushed after * processing a batch of actions (to avoid a performance penalty for other * processes). */ apply_filters( 'action_scheduler_queue_runner_flush_cache', false ); -
/** * Controls the failure threshold for recurring actions. */ apply_filters( 'action_scheduler_recurring_action_failure_threshold', 5 ); -
/** * If a recurring action is assessed as consistently failing, it will not be * rescheduled. This hook provides a way to observe and optionally override * that assessment. */ apply_filters( 'action_scheduler_recurring_action_is_consistently_failing', $first_action_id_with_the_same_hook === $first_failing_action_id, $action ); -
/** * Filter the minimum scheduled date age for action deletion. */ apply_filters( 'action_scheduler_retention_period', $this->month_in_seconds ); -
/** * Allow 3rd party code to change the instantiated action for a given hook, * args, schedule and group. */ apply_filters( 'action_scheduler_stored_action_instance', $action, $hook, $args, $schedule, $group, $priority ); -
/** * Fires after optimizing an attachment. */ do_action( 'after_imagify_ngg_optimize_attachment', $this->id, $data ); -
/** * Fires after optimizing a thumbnail. */ do_action( 'after_imagify_ngg_optimize_new_thumbnail', $this->id, $data ); -
/** * Fires after optimizing all thumbnails. */ do_action( 'after_imagify_ngg_optimize_thumbnails', $this->id, $data ); -
/** * Fires after restoring an attachment. */ do_action( 'after_imagify_ngg_restore_attachment', $this->id ); -
after_imagify_optimize_file
action/** * Fires after optimizing an attachment. */ do_action( 'after_imagify_optimize_file', $this->id, $this->get_data() ); -
/** * Fires after optimizing the missing thumbnails. */ do_action( 'after_imagify_optimize_missing_thumbnails', $this->id, $result_sizes, $errors ); -
/** * Fires after re-optimizing some thumbnails of an attachment. */ do_action( 'after_imagify_reoptimize_attachment_thumbnails', $this->id, $sizes ); -
after_imagify_restore_file
action/** * Fires after restoring a file. */ do_action( 'after_imagify_restore_file', $this->id ); -
/** * Triggered after updating an image width and height into its metadata. */ do_action( 'after_imagify_update_metadata_size', $this->id, $size ); -
/** * This hook is documented in * /amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php. */ apply_filters( 'as3cf_preserve_file_from_local_removal', false, $file_path ); -
/** * This filter is documented in * /amazon-s3-and-cloudfront/classes/amazon-s3-and-cloudfront.php. */ apply_filters( 'as3cf_upload_attachment_local_files_to_remove', $files_to_remove, $this->id, $attachment_path ); -
/** * Fires before optimizing an attachment. */ do_action( 'before_imagify_ngg_optimize_attachment', $this->id ); -
/** * Fires before optimizing a thumbnail. */ do_action( 'before_imagify_ngg_optimize_new_thumbnail', $this->id ); -
/** * Fires before optimizing all thumbnails. */ do_action( 'before_imagify_ngg_optimize_thumbnails', $this->id ); -
/** * Fires before restoring an attachment. */ do_action( 'before_imagify_ngg_restore_attachment', $this->id ); -
before_imagify_optimize_file
action/** * Fires before optimizing a file. */ do_action( 'before_imagify_optimize_file', $this->id ); -
/** * Fires before optimizing the missing thumbnails. */ do_action( 'before_imagify_optimize_missing_thumbnails', $this->id, $missing_sizes ); -
/** * Fires before re-optimizing some thumbnails of an attachment. */ do_action( 'before_imagify_reoptimize_attachment_thumbnails', $this->id, $sizes ); -
before_imagify_restore_file
action/** * Fires before restoring a file. */ do_action( 'before_imagify_restore_file', $this->id ); -
/** * Triggered before updating an image width and height into its metadata. */ do_action( 'before_imagify_update_metadata_size', $this->id, $size ); -
big_image_size_threshold
filter/** * This filter is documented in wp-admin/includes/image.php */ apply_filters( 'big_image_size_threshold', 2560, [ 0, 0 ], '', 0 ); -
do_imagify_optimize_retina
filter/** * Allow to optimize the retina version generated by WP Retina x2. */ apply_filters( 'do_imagify_optimize_retina', true ); -
/** * Filter any Imagify option after read. */ apply_filters( "get_imagify_{$this->get_hook_identifier()}_{$key}", $value, $default ); -
heartbeat_settings
filter/** * This filter is documented in /wp-includes/script-loader.php */ apply_filters( 'heartbeat_settings', [] ); -
imagify_activation
action/** * Imagify activation. */ do_action( 'imagify_activation', (int) $user_id ); -
/** * Add file names to the list of forbidden ones. */ apply_filters( 'imagify_add_forbidden_file_names', [], $file_names ); -
/** * Add folder patterns to the list of forbidden ones. Don't forget to use * `Imagify_Files_Scan::normalize_path_for_regex( $path )`! */ apply_filters( 'imagify_add_forbidden_folder_patterns', [], $folders ); -
/** * Add folders to the list of forbidden ones. */ apply_filters( 'imagify_add_forbidden_folders', [], $folders ); -
/** * Allow to add more <source> tags to the <picture> tag. */ apply_filters( 'imagify_additional_source_tags', '', $image ); -
imagify_after_{$hook_suffix}
action/** * Fires after optimizing a media. Any number of files can be optimized, not * necessarily all of the media files. */ do_action( "imagify_after_{$hook_suffix}", $this->optimization_process, $item ); -
/** * Triggered after a media auto-optimization init. */ do_action( 'imagify_after_auto_optimization_init', $attachment_id, $is_new_upload ); -
imagify_after_optimize
action/** * Fires after optimizing a media. Any number of files can be optimized, not * necessarily all of the media files. */ do_action( 'imagify_after_optimize', $this->optimization_process, $item ); -
imagify_after_optimize_file
action/** * Fires after a media file optimization. */ do_action( 'imagify_after_optimize_file', $this->path, $args ); -
imagify_after_optimize_size
action/** * Fires after optimizing a file. */ do_action( 'imagify_after_optimize_size', $this, $file, $thumb_size, $optimization_level, $next_gen, $is_disabled ); -
imagify_after_restore_media
action/** * Fires after restoring a media. */ do_action( 'imagify_after_restore_media', $this, $response, $files, $data ); -
/** * Triggered after updating an image width and height into its metadata. */ do_action( "imagify_after_update_{$context}_media_data_dimensions", $this->get_id(), $dimensions ); -
/** * Prevent the replacement of <img> tags into <picture> tags. */ apply_filters( 'imagify_allow_picture_tags_for_nextgen', true ); -
/** * Filter the timeout value for any request to the API. */ apply_filters( 'imagify_api_http_request_timeout', $args['timeout'], $endpoint ); -
/** * Filter the metadata stored after optimization or a restore. */ apply_filters( 'imagify_as3cf_attachment_cleanup_metadata', $new_metadata, $this->id ); -
imagify_as3cf_is_s3_url
filter/** * Tell if an URL is a S3 one. */ apply_filters( 'imagify_as3cf_is_s3_url', null, $url ); -
imagify_assets_enqueued
action/** * Triggered after Imagify CSS and JS have been enqueued. */ do_action( 'imagify_assets_enqueued' ); -
imagify_async_job_url
filter/** * Filter the URL to use for async jobs. */ apply_filters( 'imagify_async_job_url', $url, $args ); -
/** * Allow to prevent automatic optimization for a specific NGG gallery image. */ apply_filters( 'imagify_auto_optimize_ngg_gallery_image', true, $image_id, $gallery_id ); -
/** * Allow to prevent automatic reoptimization for a specific attachment. */ apply_filters( 'imagify_auto_optimize_optimized_attachment', true, $attachment_id, $metadata ); -
/** * Filter the URL to use for background processes. */ apply_filters( 'imagify_background_process_url', $this->query_url, $this ); -
imagify_backup_directory
filter/** * Filter the backup directory path. */ apply_filters( 'imagify_backup_directory', $backup_dir ); -
/** * Fires before optimizing a media. Any number of files can be optimized, not * necessarily all of the media files. If you want to return a WP_Error, use * the existing $wp_error object. */ apply_filters( "imagify_before_{$hook_suffix}", [], $wp_error, $this->optimization_process, $item ); -
/** * Fires before an attachment auto-optimization is triggered. */ do_action_deprecated( 'imagify_before_auto_optimization_launch', [ $attachment_id, $is_new_upload ], '1.9', 'imagify_before_auto_optimization' ); -
imagify_before_optimize
filter/** * Fires before optimizing a media. Any number of files can be optimized, not * necessarily all of the media files. If you want to return a WP_Error, use * the existing $wp_error object. */ apply_filters( 'imagify_before_optimize', [], $wp_error, $this->optimization_process, $item ); -
imagify_before_optimize_file
action/** * Fires before a media file optimization. */ do_action( 'imagify_before_optimize_file', $this->path, $args ); -
imagify_before_optimize_size
filter/** * Fires before optimizing a file. Return a WP_Error object to prevent the * optimization. */ apply_filters( 'imagify_before_optimize_size', null, $this, $file, $thumb_size, $optimization_level, $next_gen, $is_disabled ); -
imagify_before_restore_media
filter/** * Fires before restoring a media. Return a WP_Error object to prevent the * restoration. */ apply_filters( 'imagify_before_restore_media', null, $this ); -
/** * Triggered before updating an image width and height into its metadata. */ do_action( "imagify_before_update_{$context}_media_data_dimensions", $this->get_id(), $dimensions ); -
imagify_buffer
filter/** * Filter the page content after Imagify. */ apply_filters( 'imagify_buffer', $buffer ); -
imagify_bulk_buffer_size
filter/** * Filter the number of parallel queries during the Bulk Optimization * (library). */ apply_filters_deprecated( 'imagify_bulk_buffer_size', [ $translations['bufferSizes']['wp'] ], '1.7', 'imagify_bulk_buffer_sizes' ); -
imagify_bulk_class_name
filter/** * Filter the name of the class to use for bulk process. */ apply_filters( 'imagify_bulk_class_name', $class_name, $context ); -
/** * Fires before testing for file existence. */ do_action( 'imagify_bulk_generate_nextgen_before_file_existence_tests', $ids, $metas, 'wp' ); -
/** * Filter the number of parallel queries generating WebP images by bulk method. */ apply_filters( 'imagify_bulk_generate_webp_buffer_size', 4 ); -
imagify_bulk_page_data
filter/** * Filter the data to use on the bulk optimization page. */ apply_filters( 'imagify_bulk_page_data', $data, $types ); -
imagify_bulk_page_types
filter/** * Filter the types to display in the bulk optimization page. */ apply_filters( 'imagify_bulk_page_types', $types ); -
imagify_bulk_stats
filter/** * Filter the generic stats used in the bulk optimization page. */ apply_filters( 'imagify_bulk_stats', $data, $types, $args ); -
imagify_bulk_stopped
action/** * Fires after a bulk process has been manually stopped. */ do_action( 'imagify_bulk_stopped', $contexts, $cancelled ); -
imagify_can_send_to_cdn
filter/** * Tell if a media can (and should) be sent to the CDN. */ apply_filters( 'imagify_can_send_to_cdn', $can[ $this->id ], $this, $cdn_setting, $is_new_upload ); -
imagify_can_send_to_s3
filter/** * Filter the result of Imagify_AS3CF_Attachment::can_send_to_s3(). */ apply_filters( 'imagify_can_send_to_s3', $can[ $this->id ], $this->id, $s3_object, $is_s3_setup, $copy_to_s3, $this->use_s3_settings ); -
imagify_cdn
filter/** * The CDN to use for this media. */ apply_filters( 'imagify_cdn', false, $media_id, $context ); -
imagify_context_class_name
filter/** * Filter the name of the class to use to define a context. */ apply_filters( 'imagify_context_class_name', $class_name, $context ); -
imagify_count_attachments
filter/** * Filter the number of attachments. 3rd party will be able to override the * result. */ apply_filters( 'imagify_count_attachments', false ); -
/** * Filter the number of optimized attachments with an error. 3rd party will be * able to override the result. */ apply_filters( 'imagify_count_error_attachments', false ); -
imagify_count_error_files
filter/** * Filter the number of images in custom folders with an error. */ apply_filters( 'imagify_count_error_files', false ); -
imagify_count_files
filter/** * Filter the number of images in custom folders. */ apply_filters( 'imagify_count_files', false ); -
/** * Filter the number of images without status in custom folders. */ apply_filters( 'imagify_count_no_status_files', false ); -
/** * Filter the number of optimized attachments. 3rd party will be able to * override the result. */ apply_filters( 'imagify_count_optimized_attachments', false ); -
/** * Filter the number of optimized images in custom folders. */ apply_filters( 'imagify_count_optimized_files', false ); -
imagify_count_saving_data
filter/** * Filter the query to get all optimized attachments. 3rd party will be able to * override the result. */ apply_filters( 'imagify_count_saving_data', false ); -
imagify_count_success_files
filter/** * Filter the number of images successfully optimized by Imagify in custom * folders. */ apply_filters( 'imagify_count_success_files', false ); -
/** * Filter the number of unoptimized attachments. 3rd party will be able to * override the result. */ apply_filters( 'imagify_count_unoptimized_attachments', false ); -
/** * Filter the number of unoptimized images in custom folders. */ apply_filters( 'imagify_count_unoptimized_files', false ); -
imagify_crop_thumbnail
filter/** * In case of a dynamic thumbnail we don’t know if the image must be croped * or resized. */ apply_filters( 'imagify_crop_thumbnail', null, $size, $size_data, $media ); -
/** * Tell which http version to use with cURL during image optimization. */ apply_filters( 'imagify_curl_http_version_1_0', false ); -
/** * Filter the SQL query allowing to remove the limit on JOINs. */ apply_filters( 'imagify_db_unlimit_joins_query', $query ); -
/** * List of partners affected by this option. For internal use only. */ apply_filters( 'imagify_deactivatable_partners', [] ); -
imagify_deactivation
action/** * Imagify deactivation. */ do_action( 'imagify_deactivation' ); -
/** * Allow to add more default option values. */ apply_filters( "imagify_default_{$this->get_hook_identifier()}_values", [], $default_values ); -
imagify_delete_media
action/** * Triggered bifore a media is deleted. */ do_action( 'imagify_delete_media', $process ); -
imagify_deprecated_class_run
action/** * Fires when a deprecated class is called. */ do_action( 'imagify_deprecated_class_run', $class_name, $version, $replacement, $parent_class ); -
/** * Filters whether to trigger an error for deprecated classes. */ apply_filters( 'imagify_deprecated_class_trigger_error', true ); -
imagify_dir_conf_contents
filter/** * Filter the contents to add to the directory conf file. */ apply_filters( 'imagify_dir_conf_contents', $contents ); -
imagify_dir_conf_path
filter/** * Filter the path to the directory conf file. */ apply_filters( 'imagify_dir_conf_path', $file_path ); -
/** * Disable directory conf edition. */ apply_filters( 'imagify_disable_dir_conf_edition', false ); -
imagify_dismiss_notice
action/** * Fires when a notice is dismissed. */ do_action( 'imagify_dismiss_notice', $notice ); -
/** * Allow to not display the "Generate next-gen versions" link. */ apply_filters( 'imagify_display_generate_next_gen_versions_link', $display, $process, $context ); -
/** * Allow to not display the "Optimize missing thumbnails" link. */ apply_filters( 'imagify_display_missing_thumbnails_link', true, $process, $context ); -
imagify_do_async_job_args
filter/** * Filter the arguments used to launch an async job. */ apply_filters( 'imagify_do_async_job_args', $args ); -
imagify_event_recurrence
filter/** * Filter the recurrence of the event. */ apply_filters( 'imagify_event_recurrence', $this->event_recurrence, $this->get_event_name() ); -
imagify_event_time
filter/** * Filter the time at which the event is triggered (WordPress time). */ apply_filters( 'imagify_event_time', $this->event_time, $this->get_event_name() ); -
/** * Filter the backup directory path (custom folders). */ apply_filters( 'imagify_files_backup_directory', $backup_dir ); -
/** * Filter the optimization data of the full size. */ apply_filters( 'imagify_fill_ngg_full_size_data', $data, $response, $this->id, $attachment_path, $attachment_url, 'full', $optimization_level ); -
imagify_first_install
action/** * Triggered on Imagify first install (site level). */ do_action( 'imagify_first_install' ); -
/** * Triggered on Imagify first install (network). */ do_action( 'imagify_first_network_install' ); -
imagify_get_folder_type_data
filter/** * Provide custom folder type data. */ apply_filters( 'imagify_get_folder_type_data', [], $context ); -
/** * Filter the optimized sizes of all successfully optimized files. */ apply_filters( 'imagify_get_optimized_files_size', false ); -
/** * Filter the original sizes of all successfully optimized files. */ apply_filters( 'imagify_get_original_files_size', false ); -
imagify_keep_large_next_gen
filter/** * Allow to not store next-gen images that are larger than their non-next-gen * version. */ apply_filters( 'imagify_keep_large_next_gen', true ); -
imagify_loaded
action/** * Fires when Imagify is fully loaded. */ do_action( 'imagify_loaded', $this ); -
imagify_locale
filter/** * Filter the locale used by Imagify. */ apply_filters( 'imagify_locale', $locale ); -
imagify_media_files
filter/** * Filter the media files. */ apply_filters( 'imagify_media_files', $files, $this ); -
/** * Triggered after Imagify CSS and JS have been enqueued for the media modal. */ do_action( 'imagify_media_modal_assets_enqueued' ); -
/** * Filter the regex pattern used to match the uploads subdir on multisite in a * file path. Pattern delimiter is `Imagify_Filesystem::PATTERN_DELIMITER`. * Important: lowercase, no heading slash, mandatory trailing slash. */ apply_filters( 'imagify_multisite_uploads_subdir_pattern', $pattern ); -
imagify_network_upgrade
action/** * Triggered on Imagify upgrade (network). */ do_action( 'imagify_network_upgrade', $network_version, $site_version ); -
/** * Fires when a new attachment is uploaded but auto-optimization is disabled. */ do_action( 'imagify_new_attachment_auto_optimization_disabled', $attachment_id, $metadata ); -
/** * Filters the array of next gen formats to generate with Imagify */ apply_filters( 'imagify_nextgen_images_formats', $formats ); -
/** * Filter the query to get all optimized NGG attachments. 3rd party will be * able to override the result. */ apply_filters( 'imagify_ngg_count_saving_data', false ); -
/** * Fires when an attachment is updated but not optimized yet. */ do_action( 'imagify_not_optimized_attachment_updated', $attachment_id, $metadata ); -
/** * Provide a URL to a page displaying optimization errors for the given * context. */ apply_filters( 'imagify_optimization_errors_url', '', $arg ); -
/** * Filter the context used for the optimization. */ apply_filters( 'imagify_optimize_attachment_context', $context, $attachment_id, $identifier ); -
imagify_optimize_sizes_args
filter/** * Filter the data sent to the optimization process. */ apply_filters( 'imagify_optimize_sizes_args', [], $args, $this, $sizes, $optimization_level ); -
/** * Filter the percent of optimized attachments. 3rd party will be able to * override the result. */ apply_filters( 'imagify_percent_optimized_attachments', false ); -
/** * Filter the percent of optimized images in custom folders. */ apply_filters( 'imagify_percent_optimized_files', false ); -
imagify_picture_attributes
filter/** * Filter the attributes to be added to the <picture> tag. */ apply_filters( 'imagify_picture_attributes', $attributes, $image ); -
/** * Filter the attributes to be added to the <img> tag. */ apply_filters( 'imagify_picture_img_attributes', $attributes, $image ); -
/** * Filter the attributes to be added to the <source> tag. */ apply_filters( 'imagify_picture_source_attributes', $attributes, $image ); -
imagify_post_statuses
filter/** * Filter the post statuses Imagify is allowed to optimize. */ apply_filters( 'imagify_post_statuses', $statuses ); -
/** * Tell if a next-gen version can be created for the given file. The file is an * image. */ apply_filters( 'imagify_pre_can_create_next_gen_version', $can, $file_path ); -
imagify_process_class_name
filter/** * Filter the name of the class to use for the optimization. */ apply_filters( 'imagify_process_class_name', $class_name, $context ); -
imagify_redirect_to
filter/** * Filter the URL to redirect to. */ apply_filters( 'imagify_redirect_to', $redirect ); -
imagify_register_context
filter/** * Register new contexts. */ apply_filters( 'imagify_register_context', [] ); -
/** * Allow to filter the "reset" option values. */ apply_filters( "imagify_reset_{$this->get_hook_identifier()}_values", $reset_values ); -
imagify_settings_on_save
filter/** * Filter settings when saved via the settings page. */ apply_filters( 'imagify_settings_on_save', $values ); -
imagify_settings_webp_info
action/** * Add more information about WebP. */ do_action( 'imagify_settings_webp_info' ); -
imagify_site_root
filter/** * Filter the path to the site's root. */ apply_filters( 'imagify_site_root', null ); -
imagify_site_root_url
filter/** * Filters the URL of the site's root. */ apply_filters( 'imagify_site_root_url', $root_url, $blog_id ); -
/** * Allow to provide all files size and the number of thumbnails. */ apply_filters( 'imagify_total_attachment_filesize', false, $image_id, $files, $image_ids ); -
/** * Filter the unoptimized attachments limit query. */ apply_filters( 'imagify_unoptimized_attachment_limit', 10000 ); -
imagify_upgrade
action/** * Triggered on Imagify upgrade (site level). */ do_action( 'imagify_upgrade', $network_version, $site_version ); -
/** * Filter the User-Agent used for requests "to self". */ apply_filters( 'imagify_user_agent_for_internal_requests', $user_agent, $r, $url ); -
/** * Filter the images to display with a <picture> tag. */ apply_filters( 'imagify_webp_picture_images_to_display', $images, $content ); -
/** * Filter a processed image tag. */ apply_filters( 'imagify_webp_picture_process_image', $data, $image ); -
/** * Filter the optimization data. */ apply_filters( "imagify{$_unauthorized}_file_optimization_data", $data, $response, $size, $level, $this->get_data() ); -
imagifybeat_tick
action/** * Fires when Imagifybeat ticks in logged-in environments. */ do_action( 'imagifybeat_tick', $response, $screen_id ); -
/** * This filter is documented in /wp-admin/options.php. */ apply_filters( "option_page_capability_{$this->settings_group}", 'manage_network_options' ); -
pre_as_enqueue_async_action
filter/** * Provides an opportunity to short-circuit the default process for enqueuing * async actions. */ apply_filters( 'pre_as_enqueue_async_action', null, $hook, $args, $group, $priority, $unique ); -
pre_as_schedule_cron_action
filter/** * Provides an opportunity to short-circuit the default process for enqueuing * cron actions. */ apply_filters( 'pre_as_schedule_cron_action', null, $timestamp, $schedule, $hook, $args, $group, $priority, $unique ); -
/** * Provides an opportunity to short-circuit the default process for enqueuing * recurring actions. */ apply_filters( 'pre_as_schedule_recurring_action', null, $timestamp, $interval_in_seconds, $hook, $args, $group, $priority, $unique ); -
/** * Provides an opportunity to short-circuit the default process for enqueuing * single actions. */ apply_filters( 'pre_as_schedule_single_action', null, $timestamp, $hook, $args, $group, $priority, $unique ); -
/** * Pre-filter any Imagify option before read. */ apply_filters( "pre_get_imagify_{$this->get_hook_identifier()}_{$key}", null, $default ); -
pre_imagify_request
filter/** * Allows to mock Imagify calls to the API. */ apply_filters( 'pre_imagify_request', null, $url, $args ); -
wp_ajax_{$action}
action/** * This hook is documented in wp-admin/admin-ajax.php. */ do_action( "wp_ajax_{$action}" ); -
wp_image_editors
filter/** * This filter is documented in /wp-includes/media.php. */ apply_filters( 'wp_image_editors', [ 'WP_Image_Editor_Imagick', 'WP_Image_Editor_GD' ] ); -
imagify_cdn_source_url
filterapply_filters( 'imagify_cdn_source_url', '' ); -
do_action( 'action_scheduler_after_process_queue' ); -
do_action( 'action_scheduler_before_process_queue' ); -
do_action( 'action_scheduler_bulk_cancel_actions', $action_ids ); -
do_action( 'action_scheduler_canceled_action', $action_id ); -
do_action( 'action_scheduler_deleted_action', $action_id ); -
do_action( 'action_scheduler_failed_fetch_action', $action_id, $exception ); -
apply_filters( 'action_scheduler_list_table_column_args', '', $row ); -
apply_filters( 'action_scheduler_maximum_execution_time', $time_limit ); -
do_action( 'action_scheduler_stored_action', $action_id ); -
do_action( 'action_scheduler/migrated_action', $source_action_id, $destination_action_id, $this->source, $this->destination ); -
https_local_ssl_verify
filterapply_filters( 'https_local_ssl_verify', false ); -
whitelist_options
filterapply_filters_deprecated( 'whitelist_options', [ [] ], '5.5.0', 'allowed_options', __( 'Please consider writing more inclusive code.' ) ); -
apply_filters( 'action_scheduler_admin_notice_html', $action_message_html, $action, $notification ); -
apply_filters( 'action_scheduler_admin_view_class', 'ActionScheduler_AdminView' ); -
do_action( 'action_scheduler_after_execute', $action_id, $action, $context ); -
apply_filters( 'action_scheduler_allow_async_request_runner', $allow ); -
apply_filters( 'action_scheduler_async_request_sleep_seconds', 5, $this ); -
do_action( 'action_scheduler_before_execute', $action_id, $context ); -
do_action( 'action_scheduler_begin_execute', $action_id, $context ); -
apply_filters( 'action_scheduler_check_pastdue_actions', current_user_can( 'manage_options' ) ); -
apply_filters( 'action_scheduler_enable_recreate_data_store', true ); -
do_action( 'action_scheduler_execution_ignored', $action_id, $context ); -
do_action( 'action_scheduler_failed_action', $action_id, $timeout ); -
do_action( 'action_scheduler_failed_to_schedule_next_instance', $action_id, $e, $action ); -
apply_filters( 'action_scheduler_failure_period', $time_limit ); -
apply_filters( 'action_scheduler_load_deprecated_functions', true ); -
action_scheduler_lock_class
filterapply_filters( 'action_scheduler_lock_class', 'ActionScheduler_OptionLock' ); -
apply_filters( 'action_scheduler_lock_duration', self::$lock_duration, $lock_type ); -
apply_filters( 'action_scheduler_logger_class', 'ActionScheduler_wpCommentLogger' ); -
apply_filters( 'action_scheduler_maximum_args_length', 191 ); -
apply_filters( 'action_scheduler_maximum_execution_time_likely_to_be_exceeded', $likely_to_be_exceeded, $this, $processed_actions, $execution_time, $max_execution_time ); -
apply_filters( 'action_scheduler_memory_exceeded', $memory_exceeded, $this ); -
apply_filters( 'action_scheduler_migrate_data_store', false ); -
apply_filters( 'action_scheduler_migration_dependencies_met', true ); -
apply_filters( 'action_scheduler_pastdue_actions_check', $check, $num_pastdue_actions, $threshold_seconds, $threshold_min ); -
apply_filters( 'action_scheduler_pastdue_actions_check_interval', round( $threshold_seconds / 4 ), $threshold_seconds ); -
apply_filters( 'action_scheduler_pastdue_actions_check_pre', null ); -
do_action( 'action_scheduler_pastdue_actions_extra_notices', $query_args ); -
apply_filters( 'action_scheduler_pastdue_actions_min', 1 ); -
apply_filters( 'action_scheduler_pastdue_actions_seconds', DAY_IN_SECONDS ); -
apply_filters( 'action_scheduler_post_status_args', $args ); -
apply_filters( 'action_scheduler_post_status_failed_labels', $labels ); -
apply_filters( 'action_scheduler_post_status_running_labels', $labels ); -
apply_filters( 'action_scheduler_post_type_args', $args ); -
do_action( 'action_scheduler_pre_theme_init' ); -
apply_filters( 'action_scheduler_queue_runner_batch_size', 25 ); -
apply_filters( 'action_scheduler_queue_runner_class', 'ActionScheduler_QueueRunner' ); -
apply_filters( 'action_scheduler_queue_runner_concurrent_batches', 1 ); -
apply_filters( 'action_scheduler_queue_runner_time_limit', $time_limit ); -
do_action( 'action_scheduler_reset_action', $action_id ); -
action_scheduler_run_queue
actiondo_action( 'action_scheduler_run_queue', 'Async Request' ); -
apply_filters( 'action_scheduler_run_schedule', self::WP_CRON_SCHEDULE ); -
action_scheduler_store_class
filterapply_filters( 'action_scheduler_store_class', self::DEFAULT_CLASS ); -
apply_filters( 'action_scheduler_stored_action_class', $action_class, $status, $hook, $args, $schedule, $group ); -
apply_filters( 'action_scheduler_taxonomy_args', $args ); -
apply_filters( 'action_scheduler_timeout_period', $time_limit ); -
do_action( 'action_scheduler_unexpected_shutdown', $this->action_id, $error ); -
apply_filters( 'action_scheduler_use_cpu_execution_time', defined( 'PANTHEON_ENVIRONMENT' ) ); -
do_action( 'action_scheduler/created_table', $updated_table, $table ); -
do_action( 'action_scheduler/migrate_action_dry_run', $source_action_id ); -
do_action( 'action_scheduler/migrate_action_failed', $source_action_id, $this->source, $this->destination ); -
do_action( 'action_scheduler/migrate_action_incomplete', $source_action_id, $destination_action_id, $this->source, $this->destination ); -
do_action( 'action_scheduler/migration_batch_complete', $action_ids ); -
apply_filters( 'action_scheduler/migration_batch_size', 250 ); -
do_action( 'action_scheduler/migration_batch_starting', $action_ids ); -
do_action( 'action_scheduler/migration_complete' ); -
apply_filters( 'action_scheduler/migration_config', $config ); -
apply_filters( 'action_scheduler/migration_interval', 0 ); -
do_action( 'action_scheduler/no_action_to_migrate', $source_action_id, $this->source, $this->destination ); -
do_action( 'action_scheduler/progress_tick', $this->total_ticks ); -
admin_memory_limit
filterapply_filters( 'admin_memory_limit', $wp_max_limit ); -
allowed_options
filterapply_filters( 'allowed_options', $allowed_options ); -
http_headers_useragent
filterapply_filters( 'http_headers_useragent', 'WordPress/' . get_bloginfo( 'version' ) . '; ' . get_bloginfo( 'url' ), $url ); -
https_ssl_verify
filterapply_filters( 'https_ssl_verify', false ); -
do_action( 'imagify_after_reset_internal_state' ); -
apply_filters_deprecated( 'imagify_allow_picture_tags_for_webp', [ true ], '2.2', 'imagify_allow_picture_tags_for_nextgen' ); -
apply_filters( 'imagify_db_in_clause_sql_budget', $sql_budget ); -
apply_filters_deprecated( 'imagify_display_generate_webp_versions_link', [ true, $process, $context ], '2.2', 'imagify_display_generate_next_gen_versions_link' ); -
imagify_mcp_ability_executed
actiondo_action( 'imagify_mcp_ability_executed', $this->get_id(), $this->get_name(), $result, $start_time, $args ); -
do_action( 'imagify_mcp_permission_denied', $this->get_id(), $this->get_name(), $this->get_required_capability() ); -
apply_filters_deprecated( 'imagify_pre_can_create_webp_version', [ null, $file_path ], '2.2', 'imagify_pre_can_create_next_gen_version' ); -
do_action( 'imagify_settings_after_lossless' ); -
ngg_recovered_image
actiondo_action( 'ngg_recovered_image', $image_data ); -
rocket_container
filterapply_filters( 'rocket_container', null );
Generated from Imagify Image Optimization: Optimize Images'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: