Anki import: images (+ card references) are renamed with appendix

Hey,
if I edit the content of an image example.jpg - but without changing the file name - and export the affected Anki cards and then import them again in another profile (with the same card collection), the “previous/old” image file example.jpg is not replaced during import, but rather the “new/updated/imported” image file example.jpg is renamed with an appendix such as example_1549051711369.jpg. The same appendix is applied to all (content-wise) updated images during import.

This may sound like a nuance, but in Medicine content updates of images/illustrations are quite frequent and the updated deck is distributed to a lot of medical students.

I don’t really know what the long-term implications of this are and if there are any pitfalls at all, but I’m curious as to why Anki doesn’t replace the image files in the collection.media folder on import. Right now I have a deck version with about 1000 image updates in the pipeline, but I’m hesitant to release it because all users will have different collection.media files and card references (<img src="...">) after updating.

Happy about any feedback and thank you in advance!

Anki has no way of efficiently knowing at import time which cards are using the existing image, and whether it is actually an updated version of the existing image, or something unrelated. Some people use tools that add images like “image.jpg”, “image (1).jpg” and so on to the media folder, that can result in identical filenames but completely different content, and to update the existing filename could result in unrelated cards suddenly showing an inappropriate image.

Alright, thanks so much for the quick response! Really appreciate it

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.