Improve the layout for portrait-orientation images. (#475)