Instant Images icon
Media, Galleries & Sliders

Instant Images hooks reference

  • By connekthq
  • v7.2.0
  • Updated

Instant Images 7.2.0 has 4 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.

functions.phpyour child theme
// Run your own code when Instant Images fires an action
add_action( 'instant_images_after_upload', function( $arg1 ) {
	// Your code runs here.
}, 10, 1 );

// Change a value Instant Images is about to use
add_filter( 'instant_images_settings_user_role', function( $value ) {
	// Change $value here.
	return $value;
}, 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

  • api/download.php line 186
    /**
     * Instant Images Core Hook. Fired after a successful image upload to media
     * library.
     */
    do_action( 'instant_images_after_upload', [ 'filename' => $name, 'id' => $id, 'title' => $title, 'alt' => $alt, 'caption' => $caption, 'attachment_id' => $image_id, 'attachment_url' => wp_get_attachment_url( $image_id ), 'provider' => $provider, 'original_url' => $image_url, ] );
  • admin/admin.php line 35 · used in 2 places
    apply_filters( 'instant_images_settings_user_role', 'manage_options' );
  • admin/admin.php line 24 · used in 2 places
    apply_filters( 'instant_images_user_role', 'upload_files' );
  • instant-images.php line 407
    apply_filters( 'instant_images_attribution', false );
  • instant-images.php line 260
    apply_filters( 'instant_images_excluded_sidebar_screens', [ 'widgets', 'site-editor', 'woocommerce_page_wc-admin', 'toplevel_page_search-filter' ] );
  • instant-images.php line 662
    do_action( 'instant_images_image_size_after', $key );
  • instant-images.php line 660
    do_action( 'instant_images_image_size_before', $key );
  • instant-images.php line 656
    do_action( 'instant_images_image_size_tr_class', $key );
  • admin/admin.php line 254
    apply_filters( 'instant_images_mask_license_keys', false );
  • instant-images.php line 403
    apply_filters( 'instant_images_openverse_mature', false );
  • instant-images.php line 393
    apply_filters( 'instant_images_pixabay_safesearch', true );
  • instant-images.php line 383
    apply_filters( 'instant_images_query_debug', false );
  • api/download.php line 175
    apply_filters( 'instant_images_save_post_meta', true );
  • instant-images.php line 388
    apply_filters( 'instant_images_unsplash_content_filter', 'low' );
  • admin/includes/settings.php line 173
    apply_filters( 'instant_images_validate_input_settings', $output, $input );

Generated from Instant 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: