Added feature to allow only certain image sizes.