Add $maxHeight and $maxWidth