CompressX 0.9.40 has 11 actions and 11 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 CompressX fires an action
add_action( 'compressx_output_footer', function() {
// Your code runs here.
}, 10, 1 );
// Change a value CompressX is about to use
add_filter( 'compressx_current_user_can', function( $value, $arg2 ) {
// Change $value here.
return $value;
}, 10, 2 );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
-
compressx_current_user_can
filterapply_filters( 'compressx_current_user_can', true, 'compressx-can-convert' ); -
compressx_get_screen_id
filterapply_filters( 'compressx_get_screen_id', $toplevel_screen_id ); -
compressx_output_header
actiondo_action( 'compressx_output_header' ); -
compressx_current_user_has
filterapply_filters( 'compressx_current_user_has', false, 'compressx-can-use-logs' ); -
compressx_get_screen_ids
filterapply_filters( 'compressx_get_screen_ids', $screen_ids ); -
do_action( 'compressx_after_optimize_image', $attachment_id ); -
apply_filters( 'compressx_allowed_image_auto_optimization', false ); -
compressx_pro_media_replace
filterapply_filters( 'compressx_pro_media_replace', $has ); -
compressx_purge_cache
actiondo_action( 'compressx_purge_cache' ); -
apply_filters( 'compressx_ajax_check_security', $check, $role ); -
compressx_delete_image
actiondo_action( 'compressx_delete_image', $image_id ); -
compressx_notices
actiondo_action( 'compressx_notices' ); -
compressx_notices_v2
actiondo_action( 'compressx_notices_v2' ); -
compressx_output_review_v2
actiondo_action( 'compressx_output_review_v2' ); -
compressx_support_mu
filterapply_filters( 'compressx_support_mu', false ); -
apply_filters( 'compressx_supported_mime_types', $supported_mime_types ); -
do_action( 'compressx_uploading_add_watermark', $attachment_id ); -
cx_output_custom_bulk
actiondo_action( 'cx_output_custom_bulk' );
Generated from CompressX'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: