I want to include one image (G0004.jpg) and I got the following error:

D:\Documents\HEIA\Physique\Analyse_spectrale\temp.tex:16: Dimension too large. [...cs[width=0.95\textwidth]{images/G0004.jpg}]
D:\Documents\HEIA\Physique\Analyse_spectrale\temp.tex:16: Dimension too large. [...cs[width=0.95\textwidth]{images/G0004.jpg}]
\usepackage{geometry} \geometry{ a4paper, margin=2.5cm }
\usepackage {array}
\graphicspath{ {images/} }

My picture Thx for your help

  • 2
    Your image is probably too large, you should reduce with some external tool. See also tex.stackexchange.com/questions/257153/… May 5, 2017 at 8:33
  • I can't reproduce the problem with your uploaded image.
    – Bobyandbob
    May 5, 2017 at 8:36
  • My image is 700x600 px. I if y try with another one, i dont have the error.
    – Warok
    May 5, 2017 at 8:38
  • @Warok This is exactly the one i used(700x600 px see). It works. Try to move the image in the same folder.
    – Bobyandbob
    May 5, 2017 at 8:42
  • Uploaded images inserted here in the questions are not the originals graphics. You would have to put it to some upload service if someone should inspect it. Perhaps it has some faulty resolution. May 5, 2017 at 8:47

1 Answer 1


Instead of


you should try

\includegraphics[width=\textwidth, height=0.9\textheight, 

Since the figure environment contains a caption but (apparently) no legend, it should suffice to set aside about 0.1\textheight to place the caption material.

Incidentally, since the float is almost certainly going to occupy an entire page, you might as well replace \begin{figure}[htbp] with \begin{figure}[p]. If nothing else, there'll be less code clutter.

  • That's a good suggestion, but the example image is in landscape format (W:H = 700:600) and the paper is A4 (portrait) so this should not be the problem here. May 5, 2017 at 9:54
  • @Schweinebacke - Thanks. Let's see if the OP provides more information about the natural dimensions of the file G0004.jpg.
    – Mico
    May 5, 2017 at 10:31
  • @Mico your method will not works for one figure: \includegraphics[width=0.0009\textwidth, height=0.0009\textheight, keepaspectratio]{./figure/figure8/ab01}
    – acsdaswe
    Oct 30, 2019 at 15:39
  • @acsdaswe - A message such as "your method will not work" is not all that specific and hence is not actionable. What exactly isn't "working"? Is LaTeX throwing an error message? If so, what does the message say? At any rate, I'm afraid I fail to understand your intended use case: What are you trying to achieve by displaying an image whose height and width dimensions are so minuscule as to make the image virtually invisible except under exceptionally high magnification? Please elaborate.
    – Mico
    Oct 30, 2019 at 16:21

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.