error messages and edit image preview