add support for middle-sized images, so we dont show the link target image, but a smaller one, between the size of the thumbnail and the link target. other small adjustments