WordPress at Your Fingertips
filter is not described

image_send_to_editor filter-hook . WP 2.5.0

Filters the image HTML markup to send to the editor when inserting an image.


add_filter( 'image_send_to_editor', 'filter_function_name_4021', 10, 9 );
function filter_function_name_4021( $html, $id, $caption, $title, $align, $url, $size, $alt, $rel ){
	// filter...

	return $html;
The image HTML markup to send.
The attachment ID.
The image caption.
The image title.
The image alignment.
The image source URL.
Requested image size. Can be any registered image size name, or an array of width and height values in pixels (in that order).
The image alternative, or alt, text.
The image rel attribute.


Since 2.5.0 Introduced.
Since 5.6.0 The $rel parameter was added.

Where the hook is called

wp-admin/includes/media.php 168
$html = apply_filters( 'image_send_to_editor', $html, $id, $caption, $title, $align, $url, $size, $alt, $rel );

Where in WP core the hook is used WordPress

wp-includes/default-filters.php 620
add_filter( 'image_send_to_editor', 'image_add_caption', 20, 8 );