% Created 2019-11-13 Wed 10:48
% Intended LaTeX compiler: xelatex
\setCJKmainfont{Source Han Serif CN}
\setCJKsansfont{Source Han Serif CN}
\setCJKmonofont{Cascadia Code}
\author{Jilen} % BAD ORDER XXX
 pdfauthor={Jilen Jilen},
 pdfcreator={Emacs 27.0.50 (Org mode 9.2.6)}, 


\begin{frame}[label={sec:org407d30b}]{Beamer image test}

This beamer presentation is exported by org-mode. But the image is not show. I tried both png/jpeg/bmp, no lucky.

Log related to image

File: """foo".png Graphic file (type bmp)


Version: This is XeTeX, Version 3.14159265-2.6-0.999991 (TeX Live 2019/Arch Linux) (preloaded format=xelatex)

  • 1
    Welcome! The graphic is of type BMP and you cannot use it. You need an image in a supported format. (You can't just change the extension and say it is foo.png. You need it to really be a PNG or whatever.) You should also edit your preamble, since its toxicity level is currently quite high. Don't load: hyperref, longtable, wrapfig, graphicx, inputenc at a minimum. hyperref and graphicx are loaded by beamer. longtable and wrapfig make no sense with beamer and inputenc isn't relevant for XeTeX. Do you really need \captionof in a presentation? – cfr Nov 13 '19 at 5:11
  • @cfr That is a png image, I am pretty sure. – jilen Nov 13 '19 at 5:20
  • 1
    The error says it is bmp. So, if it is png, there is something very wrong with it. – cfr Nov 13 '19 at 5:21
  • @cfr Both png and bmp and jpeg are treated as bitmap image, in latex I think. And that packages actually are imported by org-mode automatically. – jilen Nov 13 '19 at 5:23
  • 1
    The quotes around foo look wrong. Is your system up-to-date? There has be a few changes in file handling (and the grffile package is now obsolete). – Ulrike Fischer Nov 13 '19 at 7:12

It seems there is something wrong with the grffile package [1]. Org-mode inserts it by default. Apparently it is fixed in the new release of the package (which only loads graphicx) but I also haven't received the update containing it. I opted for removing grffile from org-latex-default-packages-alist.

[1] https://github.com/ho-tex/grffile/issues/7

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.