//This is a image?
if ($templateHtml.find('img').length)
{
html = '<img src="' + $thumbnail.find('a').attr('href') + '" class="attachFull bbCodeImage" alt="attachFull' + $thumbnail.find('a').data('attachmentid') + '" /> ';
var editor = XenForo.getEditorInForm($('#AttachmentUploader').closest('form'));
editor.execCommand('mceInsertContent', false, html);
}