When I insert an image into the slide it gets cropped to fit into the slide. How do make an image to scale to fit in without cropping or padding?

To include an image I use:


org file header:

#+startup: beamer
#+LaTeX_CLASS: beamer
#+LaTeX_CLASS_OPTIONS: [bigger]
#+OPTIONS: toc:nil

and config file contains the following:

; allow for export=>beamer by placing

;; #+LaTeX_CLASS: beamer in org files
(unless (boundp 'org-export-latex-classes)
  (setq org-export-latex-classes nil))
(add-to-list 'org-export-latex-classes
  ;; beamer class, for presentations
      \\setbeameroption{show notes}

     ("\\section{%s}" . "\\section*{%s}")


  ;; letter class, for formal letters

  (add-to-list 'org-export-latex-classes


     ("\\section{%s}" . "\\section*{%s}")
     ("\\subsection{%s}" . "\\subsection*{%s}")
     ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
     ("\\paragraph{%s}" . "\\paragraph*{%s}")
     ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

2 Answers 2


Another option is to use

#+ATTR_LATEX: :width 1.06\textwidth

This is described here: https://orgmode.org/manual/Images-in-LaTeX-export.html

For specifying image ‘:width’, ‘:height’, and other ‘:options’, use this syntax:

#+ATTR_LATEX: :width 5cm :options angle=90
  • Can you add a relevant quote from the documentation? Links might break over time, and it's expected to add a relevant quote to your answer.
    – user12563
    Commented Sep 3, 2019 at 15:31
  • I think there is a typo in the first snippet. 10.6 times the text width is almost guaranteed to make the image not fit into the slide. Is it maybe 1.06?
    – logc
    Commented Jul 4, 2020 at 6:13
  • Have you seen the size of my slides? :-) Seriously, though, you are right of course. In fact, the factor is in general probably going to be less that one.
    – loris
    Commented Jul 6, 2020 at 8:08

after countless hours of research here is the solution. includegraphics accepts width parameter and by using textwidth variable we could set the correct size.

#+LaTeX:\includegraphics[width = 1.06\textwidth]{curves.jpg}
  • Is it possible to set it for all images in a file?
    – Rotkiv
    Commented Jan 18, 2021 at 15:36
  • 1
    @Rotkiv checkout the answer below, it might be a better option in your situation, just explicitly state attribute for each image you include. You could prob do an expansion on export if line contains .jpg insert the attribute above
    – A_P
    Commented Jan 18, 2021 at 22:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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