Skip to content

Look at image file naming options #2

@mattcarmody

Description

@mattcarmody

Ankiweb comments:

Would it some possibility to make the image's name "human understeable" ? For instance "word".jpg, from our field...

Would it be possible though to grab the (new) filename from a field? Right now it's just a chaotic hash.

Follow up:

  • I was hoping that I would be able to call a method to add a name to the QImage when it's being resized but it doesn't have a name field/method, it's set when saving. Unfortunately ImageResizer doesn't call save itself, it passes the object back to Anki to save.

  • Exploring other options...

  • hash is added with Rust by add_hash_suffix_to_file_stem in rslib/src/media/files.rs. Or is it done by checksums in pylib/anki/utils.py?

  • hash is not applied to pasted .webp and .gif files in base Anki. Those files keep their name unaltered.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions