fix max width/height of images