%! TEX program = pdflatex
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\includegraphics[width=20cm, height=1cm]{example-image-a}
\includegraphics[height=30cm, width=1cm]{example-image-a}
\end{document}
⟹ log file contains
Overfull \hbox (239.0729pt too wide) in paragraph at lines 6--7
⋮
Overfull \vbox (303.66812pt too high) has occurred while \output is active []
There's no line number in the error message however. Should we still do this?