Added validation to images