Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the image format webp #5267

Closed
JiaxiangBU opened this issue Feb 2, 2019 · 4 comments
Closed

Support the image format webp #5267

JiaxiangBU opened this issue Feb 2, 2019 · 4 comments

Comments

@JiaxiangBU
Copy link

Reporting a bug?

I am an R user and use RMarkdown (use pandoc) to build an HTML document.
In the document, pandoc supports .png well instead of .webp.

I open a discussion on RStudio Community and a Github Issue on the R package rmdformats.

The recent process is as @juba said, maybe pandoc has not supported this type format yet.

Thus, it is a feature request.

@colindean
Copy link

colindean commented Jun 25, 2020

I just tried to use a webp image in PDF output and it fails.

![Test](colindean_devopsdays_hatscarf.webp)

Image here.

$ pandoc test.md -o test.pdf
[WARNING] Could not convert image '/private/var/folders/mb/p0y2_l7x4838cwdc2m3ql90rjfr3r9/T/tex2pdf.-337b7d5b9b9713d5/8820db42629a58f9d775c52991e98bec6d56540e.webp': Cannot load file
  Jpeg Invalid marker used
  PNG Invalid PNG file, signature broken
  Bitmap Invalid Bitmap magic identifier
  GIF Invalid Gif signature : RIFF¬H
  HDR Invalid radiance file signature
  Tiff Invalid endian tag value
  TGA Invalid bit depth (10)
Error producing PDF.
! LaTeX Error: Unknown graphics extension: .webp.

See the LaTeX manual or LaTeX Companion for explanation.
Type  H <return>  for immediate help.
 ...

l.67 ...db42629a58f9d775c52991e98bec6d56540e.webp}

$ pandoc --version
pandoc 2.9.2.1
Compiled with pandoc-types 1.20, texmath 0.12.0.1, skylighting 0.8.3.2
Default user data directory: /Users/colin/.local/share/pandoc or /Users/colin/.pandoc
Copyright (C) 2006-2020 John MacFarlane
Web:  https://pandoc.org
This is free software; see the source for copying conditions.
There is no warranty, not even for merchantability or fitness
for a particular purpose.

I can easily convert to something else but I would expect the error to be less noisy.

@WetABQ
Copy link

WetABQ commented Jan 11, 2022

Pandoc still seems to do not have any support for WebP Image.

$ pandoc --version
pandoc 2.16.2
Compiled with pandoc-types 1.22.1, texmath 0.12.3.3, skylighting 0.12.1,
citeproc 0.6, ipynb 0.1.0.2
Copyright (C) 2006-2021 John MacFarlane. Web:  https://pandoc.org
This is free software; see the source for copying conditions. There is no
warranty, not even for merchantability or fitness for a particular purpose.

@mb21
Copy link
Collaborator

mb21 commented Jan 11, 2022

Pandoc core should support it now. But generating a PDF via LaTeX (like @colindean tried to do) may still not work, see https://pandoc.org/MANUAL.html#creating-a-pdf

@colindean
Copy link

Pandoc definitely supports this now but LaTeX does not. This ticket is one the front page of search results for "latex webp" and the only meaningful that turns up outside of conversion sites is a Stack Overflow question suggesting conversion using cwebp ahead of compilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants