Added image size validation and trying to set correct image sizes