Closed valdearg closed 3 months ago
The first snippet does not have anything about cover, so Komga doesn't load anything. Epub is very strict about metadata, so if it's not standard epub, it won't be loaded.
<meta name="cover" content="Cover.jpg"/>
this is epub2.
Epub3 has a manifest property called cover-image
.
- Maybe test for a file in the ePub file named "cover.jpg", I'm not sure if this is universal however.
this is not standard, cover could be named anything
- In the section there's a line
<item id="cover" href="Text/cover.xhtml" media-type="application/xhtml+xml"/>
, it's probably way more complicated but the cover could be picked up from there by reading the<img alt="Cover" class="cover" src="../Images/Cover.jpg"/>
section.
this is just the list of resources in the book, the fact that it's named "cover" is coincidental.
- Have a file named book name.cover.extension in the same directory as the epub, that could then be imported at the same time? E.g. "BookName.epub" and "BookName.cover.jpg"
Komga already supports local artwork: https://komga.org/docs/guides/local-artwork-assets/
Describe your suggested feature
Bit of a strange request, but I've been looking at an issue with epub files and their cover not coming through. I think I've narrowed this down to how the Sigil software creates the epub file and the metadata in the content.opf file.
I have a book generated by the older version of Sigil which has the following metadata (summarised)
Then if I compare that to generated by a newer version of Sigil, this has an extra meta name for "cover":
This works absolutely fine, Komga loads it perfectly fine.
If I manually edit the older Sigil made file and simply add in the
<meta name="cover" content="Cover.jpg"/>
line and analyse the file once more, this gets read perfectly.I was therefore thinking either:
<item id="cover" href="Text/cover.xhtml" media-type="application/xhtml+xml"/>
, it's probably way more complicated but the cover could be picked up from there by reading the<img alt="Cover" class="cover" src="../Images/Cover.jpg"/>
section.Other details
No response
Acknowledgements