reSmush.it : The original free image compressor and optimizer plugin 1.0.6 has 1 actions and 7 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 reSmush.it : The original free image compressor and optimizer plugin fires an action
add_action( 'resmush/filesystem/addfile', function( $arg1 ) {
// Your code runs here.
}, 10, 1 );
// Change a value reSmush.it : The original free image compressor and optimizer plugin is about to use
add_filter( 'resmush/file/basedir_check', function( $restricted ) {
// Change $restricted here.
return $restricted;
}, 10, 1 );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
-
resmush/file/basedir_check
filterapply_filters( 'resmush/file/basedir_check', $restricted ); -
resmush/file/exists
filterapply_filters( 'resmush/file/exists', $this->exists, $this->fullpath, $this ); -
resmush/filesystem/abspath
filterapply_filters( 'resmush/filesystem/abspath', $abspath ); -
resmush/filesystem/addfile
actiondo_action( 'resmush/filesystem/addfile', array($destinationPath, $destination, $this, $is_new) ); -
apply_filters( 'resmush/filesystem/processFilePath', $path, $original_path ); -
resmush/image/urltopath
filterapply_filters( 'resmush/image/urltopath', false, $url ); -
resmushit_image_quality
filterapply_filters( 'resmushit_image_quality', get_option( 'resmushit_qlty') ); -
shortpixel_image_exists
filterapply_filters( 'shortpixel_image_exists', $this->exists, $this->fullpath, $this );
Generated from reSmush.it : The original free image compressor and optimizer plugin'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: