Signature

get_image_send_to_editor( $id, $caption, $title, $align, $url = '', $rel = false, $size = 'medium', $alt = '' )
id
 (integer) image attachment id
caption
 (string) image caption
title
 (string) image title attribute
align
 (string) image css alignment property
url
 (string) image src url
Default: ''
rel
 (string|boolean) image rel attribute
Default: false
size
 (string) image size (thumbnail, medium, large, full or added with add_image_size() )
Default: 'medium'
alt
 (string) image alt attribute
Default: ''

Return

(string) the html to insert into editor

Source

function get_image_send_to_editor($id, $caption, $title, $align, $url='', $rel = false, $size='medium', $alt = '') {

	$html = get_image_tag($id, $alt, '', $align, $size);

	$rel = $rel ? ' rel="attachment wp-att-' . esc_attr($id).'"' : '';

	if ( $url )
		$html = '<a href="' . esc_attr($url) . "\"$rel>$html</a>";

	/**
	 * Filter the image HTML markup to send to the editor.
	 *
	 * @since 2.5.0
	 *
	 * @param string $html    The image HTML markup to send.
	 * @param int    $id      The attachment id.
	 * @param string $caption The image caption.
	 * @param string $title   The image title.
	 * @param string $align   The image alignment.
	 * @param string $url     The image source URL.
	 * @param string $size    The image size.
	 * @param string $alt     The image alternative, or alt, text.
	 */
	$html = apply_filters( 'image_send_to_editor', $html, $id, $caption, $title, $align, $url, $size, $alt );

	return $html;
}
WP Trac GitHub

Link here