Cloudinary 3.3.9 has 17 actions and 117 filters, read directly from its source code on Nov 18, 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 Cloudinary fires an action
add_action( 'cloudinary_flush_cache', function( $arg1 ) {
// Your code runs here.
}, 10, 1 );
// Change a value Cloudinary is about to use
add_filter( 'cloudinary_enable_crop_and_gravity_control', 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
-
/** * Action to flush delivery caches. */ do_action( 'cloudinary_flush_cache' ); -
/** * Enable the Crop and Gravity control settings. */ apply_filters( 'cloudinary_enable_crop_and_gravity_control', true ); -
/** * Bypass Cloudinary's SEO URLs. */ apply_filters( 'cloudinary_bypass_seo_url', false ); -
/** * The URL to be searched for and prepared to be delivered by Cloudinary. */ apply_filters( 'cloudinary_content_url', content_url() ); -
/** * Short circuit the lazy load. */ apply_filters( 'cloudinary_lazy_load_bypass', false, $tag_element ); -
/** * This filter is documented in php/connect/class-api.php */ apply_filters( 'cloudinary_use_original_image', true, $attachment_id ); -
/** * This filter is documented in wp-includes/class-wp-http-streams.php */ apply_filters( 'https_local_ssl_verify', false ); -
/** * Filter the new built tag element. */ apply_filters( "cloudinary_{$tag_element['type']}_tag", $replace, $tag_element ); -
/** * Filter to allow GLB 3D model files to be uploaded. */ apply_filters( 'cloudinary_allow_glb_upload', false ); -
/** * Filter the allowed file extensions to be delivered. */ apply_filters( 'cloudinary_allowed_extensions', $allowed_types ); -
/** * Filter the allowed SVG tags and attributes. */ apply_filters( 'cloudinary_allowed_svg_tags', $allowed_tags ); -
/** * Filter whether the plugin emits custom analytics events. */ apply_filters( 'cloudinary_analytics_enabled', true ); -
/** * Filter whether the analytics smoke-test event is emitted. */ apply_filters( 'cloudinary_analytics_smoke_test', false ); -
/** * Filter to allow stopping default srcset generation. */ apply_filters( 'cloudinary_apply_breakpoints', true ); -
/** * Filter to allow bypassing defaults. Return false to not apply defaults. */ apply_filters( 'cloudinary_apply_default_transformations', true, $attachment_id_type ); -
/** * Filter the asset payload. */ apply_filters( 'cloudinary_asset_payload', $asset, $data ); -
/** * Filter the state of the asset. */ apply_filters( 'cloudinary_asset_state', $state, $attachment_id ); -
/** * Filter the amount of background threads to process for auto syncing. */ apply_filters( 'cloudinary_autosync_threads', 2 ); -
/** * Filter the params for the query used to build a queue. */ apply_filters( 'cloudinary_build_queue_query', $args ); -
/** * Filter to allow bypassing the cache. */ apply_filters( 'cloudinary_bypass_cache', ! is_null( $bypass ) ); -
/** * Filter to allow changing if an asset is allowed to be synced. Return a WP * Error with reason why it can't be synced. */ apply_filters( 'cloudinary_can_sync_asset', $can, $attachment_id, $type ); -
/** * Action indicating that the cloudinary is connected. */ do_action( 'cloudinary_connected', $this ); -
/** * Filter the options to allow other plugins to add requested options for * uploading. */ apply_filters( 'cloudinary_context_options', $context_options, get_post( $attachment_id ), $this ); -
/** * Get the contextualized post id. */ apply_filters( 'cloudinary_contextualized_post_id', $result->post_id ); -
/** * Filter the base types for conversion. */ apply_filters( 'cloudinary_convert_media_types', $base_types ); -
/** * Filter the final Cloudinary URL. */ apply_filters( 'cloudinary_converted_url', $url, $attachment_id, $pre_args ); -
/** * Filter the post ID. */ apply_filters( 'cloudinary_current_post_id', null ); -
/** * Filter the default Freeform transformations for the specific media type. */ apply_filters( "cloudinary_default_freeform_transformations_{$type}", array(), $transformations ); -
/** * Filter the default Quality and Format transformations for the specific media * type. */ apply_filters( "cloudinary_default_qf_transformations_{$type}", array(), $transformations ); -
/** * Filter the default cloudinary transformations. */ apply_filters( 'cloudinary_default_transformations', $transformations ); -
/** * Action fired when deleting a synced asset. */ do_action( 'cloudinary_delete_asset', $post_id ); -
/** * Filter id from the tag. */ apply_filters( 'cloudinary_delivery_get_id', $set['id'], $set ); -
/** * The URL to be searched for and prepared to be delivered by Cloudinary. */ apply_filters( 'cloudinary_delivery_searchable_url', $url, $item, $content_url ); -
/** * Filter the demo files. */ apply_filters( 'cloudinary_demo_crop_files', $this->demo_files ); -
/** * Filter to provide option to omit prefetch. */ apply_filters( 'cloudinary_dns_prefetch_types', array( 'dns-prefetch', 'preconnect' ) ); -
/** * Filter doing upload. If so, return the default attachment URL. */ apply_filters( 'cloudinary_doing_upload', false ); -
/** * Action for the downloaded assets from Cloudinary Media Library. */ do_action( 'cloudinary_download_asset', $asset, $return ); -
/** * Filter the permalink for the edit asset link. */ apply_filters( 'cloudinary_edit_asset_permalink', add_query_arg( 'asset', $tag_element['id'], $base_url ) ); -
/** * Filter whether Cloudinary should replace background image URLs in * Elementor's generated CSS. */ apply_filters( 'cloudinary_elementor_replace_background_images_in_css', true, $post_css, $element ); -
/** * Filter the enqueue of gallery script. */ apply_filters( 'cloudinary_enqueue_gallery_script', $can ); -
/** * Filter to allow stopping filtering out local. */ apply_filters( 'cloudinary_filter_out_local', true ); -
/** * Filter the list of truly unknown URLs after filtering out image size * variations. */ apply_filters( 'cloudinary_filter_unknown_urls', $truly_unknown, $urls, $known_keys ); -
/** * Filter the gallery configuration. */ apply_filters( 'cloudinary_gallery_config', $config ); -
/** * Filter the gallery HTML container. */ apply_filters( 'cloudinary_gallery_html_container', '' ); -
/** * Filter the get signature of the asset. */ apply_filters( 'cloudinary_get_signature', $return, $attachment_id ); -
/** * Filter the home url. */ apply_filters( 'cloudinary_home_url', $home_url, $path, $scheme ); -
/** * Action the Cloudinary ID to allow extending it's availability. */ do_action( 'cloudinary_id', $cloudinary_id, $attachment_id ); -
/** * Filter the keywords in classes on tags to be ignored from lazy-loading. */ apply_filters( 'cloudinary_ignored_class_keywords', $lazy_classes ); -
/** * Filter the keywords in data-* attributes on tags to be ignored from * lazy-loading. */ apply_filters( 'cloudinary_ignored_data_keywords', $lazy_keys ); -
/** * Action indicating that the delivery is starting. */ do_action( 'cloudinary_init_delivery', $this ); -
/** * Action indicating that the Settings are initialised. */ do_action( 'cloudinary_init_settings', $this ); -
/** * Filter to check if the feature is active. */ apply_filters( "cloudinary_is_{$class_name}_active", $is_active ); -
/** * Filter if the url is a local asset. */ apply_filters( 'cloudinary_is_content_dir', $is_local, $url ); -
/** * Filter deliverable attachments. */ apply_filters( 'cloudinary_is_deliverable', $is, $attachment_id ); -
/** * Filter is folder synced flag. */ apply_filters( 'cloudinary_is_folder_synced', $is_folder_synced, $attachment_id ); -
/** * Filter the check if post is media. */ apply_filters( 'cloudinary_is_media', $is_media, $attachment_id ); -
/** * Filter local media. */ apply_filters( 'cloudinary_is_uploadable_media', $is_uploadable, $media_host ); -
/** * Filter the classes that bypass lazy loading. */ apply_filters( 'cloudinary_lazy_load_bypass_classes', array( 'cld-bypass-lazy' ) ); -
/** * Filter out file formats for Lazy Load. */ apply_filters( 'cloudinary_lazy_load_bypass_formats', array( 'svg' ) ); -
/** * Filter local URL. */ apply_filters( 'cloudinary_local_url', $urls[ $attachment_id ], $attachment_id ); -
/** * Filter the maximum number of files that can be imported from Cloudinary. */ apply_filters( 'cloudinary_max_files_import', 20 ); -
/** * Filter the media context. */ apply_filters( 'cloudinary_media_context', 'default', $attachment_id ); -
/** * Filter the media context query. */ apply_filters( 'cloudinary_media_context_query', 'media_context = %s' ); -
/** * Filter the media context things. */ apply_filters( 'cloudinary_media_context_things', $media_context_things ); -
/** * Filter the Cloudinary Media Library filters. */ apply_filters( 'cloudinary_media_filters', array( Sync::META_KEYS['sync_error'] => __( 'Error', 'cloudinary' ), Sync::META_KEYS['unsynced'] => __( 'Unsynced', 'cloudinary' ), ) ); -
/** * Filter the default Cloudinary Media Types. */ apply_filters( 'cloudinary_media_types', $media_types ); -
/** * Filter the meta boxes. */ apply_filters( 'cloudinary_meta_boxes', $metaboxes ); -
/** * Filter the meta if not found, in order to migrate from a legacy plugin. */ apply_filters( 'cloudinary_migrate_legacy_meta', $post_id ); -
/** * Filter the on demand synced items limit. */ apply_filters( 'cloudinary_on_demand_sync_limit', 100 ); -
/** * Filter the tag element. */ apply_filters( 'cloudinary_parse_element', $tag_element ); -
/** * Filter types of files that can be cached. */ apply_filters( 'cloudinary_plugin_asset_cache_filters', $default_filters ); -
/** * Filter types of files that can replaced inline with a base64 encoded data * URI. */ apply_filters( 'cloudinary_plugin_asset_cache_inline_types', $inline_types ); -
/** * Filter the tag element. */ apply_filters( "cloudinary_pre_{$tag_element['type']}_tag", $tag_element ); -
/** * Filter Cloudinary size and crops */ apply_filters( 'cloudinary_prepare_size', $size, $attachment_id ); -
/** * Filter the file types that are preview only. */ apply_filters( 'cloudinary_preview_types', $base_types ); -
/** * Filter the amount of background threads to process for manual syncing. */ apply_filters( 'cloudinary_queue_threads', 2 ); -
/** * Filter a base Cloudinary URL (no transformations). */ apply_filters( 'cloudinary_raw_url', $url, $attachment_id ); -
/** * Action indicating that the Cloudinary is ready and setup. */ do_action( 'cloudinary_ready', $this ); -
/** * Filter to register extensions. */ apply_filters( 'cloudinary_register_extensions', $extensions, $this->plugin ); -
/** * Do action for setting up sync types. */ do_action( 'cloudinary_register_sync_types', $this ); -
/** * Filter the all sizes available. */ apply_filters( 'cloudinary_registered_sizes', $all_sizes ); -
/** * Filter the Cloudinary resource type for the attachment. */ apply_filters( 'cloudinary_resource_type', $type, $attachment_id ); -
/** * Filter out file formats for Responsive Images. */ apply_filters( 'cloudinary_responsive_images_bypass_formats', array( 'svg' ) ); -
/** * Filter the rest url. */ apply_filters( 'cloudinary_rest_url', $rest_url, $path, $scheme ); -
/** * Filter the SEO public ID. */ apply_filters( 'cloudinary_seo_public_id', "{$filename}.{$relationship->format}", $relationship, $attachment_id ); -
/** * Filter the found item to allow usability to be altered. */ apply_filters( 'cloudinary_set_usable_asset', $item ); -
/** * Filter the setting value. */ apply_filters( 'cloudinary_setting_get_value', $value, $slug ); -
/** * Pre-Filter the value before saving a setting. */ apply_filters( "cloudinary_settings_save_setting_{$slug}", $new_value, $current_value, $setting ); -
/** * Filter the site URL. */ apply_filters( 'cloudinary_site_url', $site_url, $path, $scheme ); -
/** * Filter to skip parsing an element. */ apply_filters( 'cloudinary_skip_parse_element', false, $element ); -
/** * Do not add the responsive breakpoint features. */ apply_filters( 'cloudinary_skip_responsive_breakpoints', false, $tag_element ); -
/** * Do replacement action. */ do_action( 'cloudinary_string_replace', $content, $context ); -
/** * Filter the sync base to allow other plugins to add requested sync components * for the sync signature. */ apply_filters( 'cloudinary_sync_base', $return, get_post( $attachment_id ), $this ); -
/** * Filter the sync base structure to allow other plugins to sync component * callbacks. */ apply_filters( 'cloudinary_sync_base_struct', $base_struct ); -
/** * Filter how many consecutive passes may end in a repeated, non-advancing sync * type for the same attachment before it's flagged with a sync error. */ apply_filters( 'cloudinary_sync_loop_strikes', 3, $type, $attachment_id ); -
/** * Filter the number of times a single sync type may recurse for the same * attachment before it's treated as stuck in a loop. */ apply_filters( 'cloudinary_sync_type_retry_limit', 50, $type, $attachment_id ); -
/** * Filter the delivery types that are able to sync. */ apply_filters( 'cloudinary_syncable_delivery_types', $types ); -
/** * Maybe skip the classes for th tag element. */ apply_filters( 'cloudinary_tag_skip_classes', false, $tag_element ); -
/** * Filter the capability required for Cloudinary tasks. */ apply_filters( 'cloudinary_task_capability', $capability, $task, $context, ...$args ); -
/** * Filter the capability required for a specific Cloudinary task. */ apply_filters( "cloudinary_task_capability_{$task}", $capability, $context, ...$args ); -
/** * Filter the params for the query used to get thread queue details. */ apply_filters( 'cloudinary_thread_queue_details_query', $args, $thread ); -
/** * Filter the Cloudinary transformations. */ apply_filters( 'cloudinary_transformations', $transformations, $attachment_id ); -
/** * Unset the attributes to avoid block errors in the admin. */ apply_filters( 'cloudinary_unset_attributes', false, $tag_element ); -
/** * Action unsyncing an attachment. */ do_action( 'cloudinary_unsync_asset', $attachment_id ); -
/** * Action to trigger an upgrade on a synced asset. */ do_action( 'cloudinary_upgrade_asset', $attachment_id, $this->media->plugin->version ); -
/** * Filter the upgrade sequence. */ apply_filters( 'cloudinary_upgrade_sequence', $upgrade_sequence ); -
/** * Filter Cloudinary upload args. */ apply_filters( 'cloudinary_upload_args', $call_args, $attachment_id ); -
/** * Filter the upload eager formats. */ apply_filters( 'cloudinary_upload_eager_formats', $formats, $type ); -
/** * Filter the options to allow other plugins to add requested options for * uploading. */ apply_filters( 'cloudinary_upload_options', $options, get_post( $attachment_id ), $this ); -
/** * Action after uploaded asset. */ do_action( 'cloudinary_uploaded_asset', $attachment_id, $result ); -
/** * Do action to allow upgrading of different areas. */ do_action( 'cloudinary_version_upgrade', $old_version, $this->plugin->version ); -
/** * This filter is documented in wp-admin/includes/media.php */ apply_filters( 'image_size_names_choose', Image_Sizes_No_Textdomain::get_image_sizes() ); -
/** * This filter is documented in wp-admin/includes/image.php */ apply_filters( 'intermediate_image_sizes_advanced', $registered, $metadata, $attachment_id ); -
/** * Filter the components build parts. */ apply_filters( 'setup_component_parts', $build_parts, $this ); -
/** * Filter to validate the Cloudinary ID to allow extending it's availability. */ apply_filters( 'validate_cloudinary_id', $cloudinary_id, $attachment_id ); -
do_action( '_cloudinary_queue_action', $action_message ); -
apply_filters( 'wpml_current_language', null ); -
apply_filters( 'cloudinary_media_status', $status, $attachment_id ); -
do_action( "{$slug}_settings_upgrade", $settings_version, $plugin_version ); -
apply_filters( 'cloudinary_admin_image_settings', $settings ); -
apply_filters( 'cloudinary_admin_pages', $settings ); -
apply_filters( 'cloudinary_admin_sidebar', $settings ); -
apply_filters( 'cloudinary_admin_video_settings', $settings ); -
apply_filters( 'cloudinary_api_rest_endpoints', array() ); -
do_action( 'cloudinary_cache_init_cache_points' ); -
apply_filters( 'cloudinary_cron_frequency', 10 * MINUTE_IN_SECONDS ); -
apply_filters( 'cloudinary_cron_start_offset', MINUTE_IN_SECONDS ); -
apply_filters( 'cloudinary_feature_cron_manager', true ); -
apply_filters( "cloudinary_settings_enabled_{$slug}", true ); -
apply_filters( 'cloudinary_settings_save_setting', $new_value, $current_value, $setting ); -
apply_filters( 'wp_lazy_loading_enabled', true ); -
apply_filters( 'wpml_element_trid', null, $duplicated_attachment_id, 'post_attachment' ); -
apply_filters( 'wpml_object_id', $post_id, 'attachment' ); -
apply_filters( 'wpml_permalink', $clean_rest_url, apply_filters( 'wpml_current_language', null ) );
Generated from Cloudinary's GPL-licensed source code. Hooks inside bundled third-party libraries are not listed.
Done for you
Rather have it built for you?
Tell us what should change and we’ll write and test the code using these hooks.
Custom hook snippet
from $49
A small, update-safe change built on the plugin’s own hooks.
- Code written against the plugin’s actions and filters
- Tested on a staging copy of your site
- Install instructions included
Typical turnaround: 2–3 business days
Choose thisPlugin customisation
from $149
New features or changed behaviour, without editing the plugin’s files.
- Built as a companion plugin, so updates never wipe it
- Exact quote before we start
- Tested on staging, then deployed
Typical turnaround: 3–7 business days
Choose thisNot sure which fits? Describe what you need and we’ll suggest the simplest option.
Can't find the right hook?
We can build the customisation for you. Describe what you need: