// validate image before create it