When replacing an image file, you do not usually need to edit the reference to the image that appears in the XML document part where the image is located in the document.
These references vary by image type, document part, and document type. However, the file name that you see in the descr attribute in these references (as shown here) is the original source file name and not the image file name as stored in the ZIP package. So, you do not need to update that reference even if you change the image file type.
Notice that the sample reference shown here includes a relationship ID reference (“rID5”). That relationship ID is what identifies the correct image file stored in the ZIP package, and it corresponds to the relationship definition for the image in the .rels file for that document part.
- The descr attribute is optional. So, if you do not want recipients of your document to see the original source file name, you can simply delete that attribute and its value. The name attribute is required, but you can change the value if you do not want to share the original source file name.
- In an Excel ZIP package, the reference that appears at the image location in a sheet#.xml or other document part contains only the relationship ID. The description of the image, such as formatting and the original source file name, is contained in a separate, numbered file inside the drawings subfolder.