enforce customizeable max allowed width and height