Added maximum image dimension configuration

Simple check and maximum image dimension enforcing.