Fix the issue of saving pictures when in edit mode