Refactor image validate method to make it a bit more extensible.
Add TODO comment for loading paths from a config file or something.