Validate image and show alert