diff --git a/epub.js b/epub.js index 65763f3..1d0867d 100644 --- a/epub.js +++ b/epub.js @@ -689,9 +689,11 @@ export class EPUB { else this.metadata[key] = [value] })) - this.getCover = () => { - const href = this.resources?.cover?.href - return href ? this.loadBlob(href) : null + this.getCover = async () => { + const cover = this.resources?.cover + return cover?.href + ? new Blob([await this.loadBlob(cover.href)], { type: cover.mediaType }) + : null } return this }