Implement 'best fit' for single media images

When showing one image in lightbox, if the image is vertical, the whole image will not be shown.
Example from demo site attached.

This is not what I would expect.
I prefer that the image is scaled down to ‘best fit’ the container.

Right now I have a jQuery hack to deal with this, but it would be better to have this as feature/option in core settings.

Attachment Link(s):

the hack again:

It is implemented 'best fit'. Please check demo site now.

Actually, admin can set height and width of large image which will be shown in light box and single media page which was set fixed on our demo site and that's why you weren't able to view the original image.