Solution: http://jsbin.com/melewe/3/edit?html,css,js,output
The requirements are:
- Reserve space for the image whilst it loads.
- Contain image (including padding) in viewport (fill width or height, whichever is smallest), whilst only taking up necessary space.
- Minimum height
- Responsive images
For 1 we can use the padding-bottom
trick.