added update images function

fixed the issue for when there is no orig file in edit form submission