Issue #2081713 by Delphine Lepers, Devin Carlson: Fixed undefined index errors when updating image files by adding missing checks for empty files.