added image maximum dimension validation