here is the function which control the links
function image_link_input_fields($post, $url_type = '') {
$file = wp_get_attachment_url($post->ID);
$link = get_attachment_link($post->ID);
if ( empty($url_type) )
$url_type = get_user_setting('urlbutton', 'post');
$url = '';
if ( $url_type == 'file' )
$url = $file;
elseif ( $url_type == 'post' )
$url = $link;
return "
<input type='text' class='text urlfield' name='attachments[$post->ID][url]' value='" . esc_attr($url) . "' />
<button type='button' class='button urlnone' title=''>" . __('None') . "</button>
<button type='button' class='button urlfile' title='" . esc_attr($file) . "'>" . __('File URL') . "</button>
<button type='button' class='button urlpost' title='" . esc_attr($link) . "'>" . __('Post URL') . "</button>
";
}
“None” = image is not a link
“Image URL” = clicking on image takes you directly to image file (https://{URL}/coolcar.jpg)
“Post URL” = clicking on image takes you to a blog-post