Adding image validation