Fixed gallery view issue with images wider than screen not shrinking correctly