take account of the image size when displaying them