Changed support for imagesize

Change the support for image dimensions.