Gives each image its path under word/, by its extension, so that it doesn't take the path of another part of the package, such as a template's image. Default numbers them by type, media/image1.png, media/image2.png and so on
Gets all images as an array, in the order they were added, each with the file name it is written with.
Read-only array of all media data in the collection
Gets all images with the keys they were added under, in the order they were added.
Read-only array of each image's key and media data, whose file name is the one it is written with
Adds an image to the media collection, once: an image added again under the same key, such as one used in the body and in a header, keeps the file name it was given the first time.
Unique identifier for this image, which the XML refers to it by until it is packed
Complete image data including type, transformation, and raw data
Manages embedded media (images) in a document.
Media stores all images referenced in the document and provides access to their data for packaging into the DOCX file. Each image is stored under a unique key, such as a hash of its data, so an image used twice is stored once.
In the package, images are named as Word names them: image1.png, image2.png and so on in word/media, numbered in the order they are added. The numbering is by type, so a document with a PNG and a JPEG has image1.png and image1.jpg. Word for the web shows images with Word's own names, and has been seen to show an empty box in place of an image whose name isn't like them. The IMediaData.fileName of an image in Array is the name it is written with, not the key it was added under.
Example