gallery image maxheight fix

fix for stretched images on mobile and capping image height to width

![image](https://cloud.githubusercontent.com/assets/960919/4095324/26f028e8-2fb3-11e4-9d26-aa614e30589e.png)