reSmush.it : The original free image compressor and optimizer plugin icon
Media, Galleries & Sliders

reSmush.it : The original free image compressor and optimizer plugin hooks reference

  • By ShortPixel
  • v1.0.6
  • Updated

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.

functions.phpyour child theme
// 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

  • build/shortpixel/filesystem/src/Model/File/DirectoryModel.php line 271 · used in 2 places
    apply_filters( 'resmush/file/basedir_check', $restricted );
  • build/shortpixel/filesystem/src/Model/File/FileModel.php line 146
    apply_filters( 'resmush/file/exists', $this->exists, $this->fullpath, $this );
  • build/shortpixel/filesystem/src/Controller/FileSystemController.php line 73
    apply_filters( 'resmush/filesystem/abspath', $abspath );
  • build/shortpixel/filesystem/src/Model/File/FileModel.php line 377
    do_action( 'resmush/filesystem/addfile', array($destinationPath, $destination, $this, $is_new) );
  • build/shortpixel/filesystem/src/Model/File/FileModel.php line 556
    apply_filters( 'resmush/filesystem/processFilePath', $path, $original_path );
  • build/shortpixel/filesystem/src/Model/File/FileModel.php line 675
    apply_filters( 'resmush/image/urltopath', false, $url );
  • classes/resmushit.class.php line 43
    apply_filters( 'resmushit_image_quality', get_option( 'resmushit_qlty') );
  • build/shortpixel/filesystem/src/Model/File/FileModel.php line 145
    apply_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: