WordPress at a glance
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_5276', 10, 8 );
function filter_function_name_5276( $html, $id, $caption, $title, $align, $url, $size, $alt ){
	// 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.
Size of image. Image size or array of width and height values (in that order).
Default: 'medium'
The image alternative, or alt, text.


Since 2.5.0 Introduced.

Where the hook is called

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

Where the hook is used (in WP core)

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