I have an .webp image that I want to use in my Latex document. However, I can't really find how to use it or is it simply not possible with Latex?
Asked
Active
Viewed 1.4k times
23
-
3Under pdfTeX (perhaps the most versatile), you can only include a fixed number of image types. See Graphics file extensions and their order of inclusion when not specified. I would assume that you should convert the image to one of these. – Werner Nov 29 '12 at 18:49
-
1Ok, also see the comment @DavidCarlisle. – Aaron Nov 29 '12 at 19:03
1 Answers
15
You probably need to convert the image to png. A freely available convertor precompiled for windows/linux/mac is available from
https://developers.google.com/speed/webp/download
then
dwebp image.webp -o image.png
should produce a usable file.
David Carlisle
- 757,742
-
1The link suggests it's a conversion tool to
.webp. Does it also convert from.webp? – Werner Nov 29 '12 at 19:00 -
5Well, I was hoping Latex would support it or that there would be a package available to add this function. – Aaron Nov 29 '12 at 19:01
-
1well if you want latex to do it on the fly you could enable shell escape and set up a graphics rule for
.webpsuch that it executes the conversion (a lot of people do this for eps/pdf conversion in pdftex) but really it's simpler just to convert it once and include the png directly unless it is changing all the time. – David Carlisle Nov 29 '12 at 19:03 -
-
-
I noticed that wbp images are much smaller than the converted PNG or PDF. Random example: from 67kb to 814kb. More and more images are available in the wbp format. – PatrickT Jun 19 '23 at 18:47
-
3@PatrickT but unless the pdf format is changed to support webp, including them in latex will necesarily be slower and not have smaller final pdf as each webp will need to be converted to a form that can be included – David Carlisle Jun 19 '23 at 18:59
-