diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 5486874415..3f6ec828ca 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -93,7 +93,9 @@ function the_media_upload_tabs() { */ function get_image_send_to_editor($id, $alt, $title, $align, $url='', $rel = false, $size='medium') { - $html = get_image_tag($id, $alt, $title, $align, $size); + $htmlalt = ( empty($alt) ) ? $title : $alt; + + $html = get_image_tag($id, $htmlalt, $title, $align, $size); $rel = $rel ? ' rel="attachment wp-att-'.attribute_escape($id).'"' : '';