Add support for auto-scaling of width and height