Open image size links in a page instead of direct image link

Ok, I found the answer (actually paid a programmer to do it)
modify to

/* Add the link to the array if there's an image and if $is_intermediate (4th array value) is true or full size. */
if ( !empty( $image ) && ( true == $image[3] || 'full' == $size ) )
$links[] = "<a class="image-size-link" href="https://wordpress.stackexchange.com/show-image.php?path={$image[0]}" target=_blank>{$image[1]} &times; {$image[2]}</a>";
}

create a file, upload it in your root (or where you want) and add this code in it:

“/>

hope this helps!