fit images according to the container