prevents images from exceeding allowed space on mobile