Open selden opened 5 months ago
We'd need a way to get the size information from the WebP file. There's this: https://hackage.haskell.org/package/webp but the dependency on an external C library rules it out.
If there's an easy way to extract the size information we can just write some custom code for that, but the format seems rather complex.
Have you tried specifying explicit size information for your image? (Width and height attributes). That might avoid the warning.
Edited yet again:
Sorry, I misread the docs. Indeed --epub-cover-image
gives the same error message as --metadata cover-image
even though the cover image is actually incorporated in the epub document.
(I'm still trying to find how to specify the image size in the pandoc command line.)
I've deleted the text of my misleading response.
Explain the problem. Problem: pandoc metadata "cover-image" doesn't recognize WebP image. It should.
The command line
generates the warning message
It'd be nice if the problem causing this warning could be fixed.
Pandoc version? This warning is seen when using pandoc 3.1.12.2 under Windows 10 Pro x64 22H2 build 19045.4046 with Cygwin 3.5.1
The .webp image file was created using ImageMagick 7.0.10-61 with the command
so I think the format of the WebP file itself is OK.
The resulting .epub document does show the cover page image when displayed using the epub reader provided with Calibre 7.6. which again suggests that the file format is OK.
The attached zip file contains the following files which can be used to reproduce the warning message.
test_webp.sh test_webp.html front_cover.webp
test_webp.epub readme.txt
test_webp.zip