added support for custom image sizes