Force images to stay within bounds