code: def replace_media(self,src_file,dst_file):
          
          with open(dst_file, 'rb') as fh:
              crc = self.get_file_crc(src_file)
              self.crc_to_new_media[crc] = fh.read()
docs: Replace one media by another one into a docx
  
          This has been done mainly because it is not possible to add images in
          docx header/footer.
          With this function, put a dummy picture in your header/footer,
          then specify it with its replacement in this function
  
          Syntax: tpl.replace_media('dummy_media_to_replace.png','media_to_paste.jpg')
  
          Note: for images, the aspect ratio will be the same as the replaced image
          Note2 : it is important to have the source media file as it is required
                  to calculate its CRC to find them in the docx