Skip to content

Feature request / question: embed cover thumbnail into CBZ file when using COMIC_INFO update mode #298

@yamanobe96

Description

@yamanobe96

Hi! First, thank you for komf — it's been very useful for managing large manga libraries.

Current behavior

When updateMode is set to COMIC_INFO, komf successfully writes metadata into the CBZ as ComicInfo.xml. However, when a cover thumbnail is fetched from a provider, it is only uploaded to Komga's internal thumbnail cache via the API (uploadBookThumbnail / uploadSeriesThumbnail). The image bytes are never written into the CBZ file itself.

This means the cover exists only in Komga's database, not in the actual file on disk.

Desired behavior

I'd like an option (e.g. embedCoverInCbz: true) where, in addition to uploading to Komga, the fetched thumbnail is also embedded into the CBZ archive as cover.jpg (or cover.png). This would make the cover truly portable — if the Komga library is scanned fresh, rebuilt, or migrated, the cover survives.

Why this matters for COMIC_INFO mode specifically

The whole point of COMIC_INFO mode seems to be making metadata self-contained in the file rather than only in the server's database. It feels natural to extend that philosophy to cover images as well.

Implementation sketch

Looking at the source, ComicInfoWriter already rewrites the ZIP in-place (creating a temp file and atomically replacing). Adding a writeCoverImage(localPath, image) method alongside writeMetadata() seems straightforward. MetadataUpdater.updateBookMetadata() could then call it when the new flag is set.

Questions

  • Is there a reason this was intentionally left out? (e.g. file size concerns, format compatibility, Komga behavior)
  • Would you be open to a PR implementing this as an opt-in option?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions