Make oversized image cover page number

Sometimes I have images that extend below the bottom margin since I want to use the entire textwidth while preserving the image ratio. When this happens, is it possible to make the image cover the page number? Currently the page number appears above the image:

\documentclass{article}
\usepackage{float}
\usepackage{graphicx}
\begin{document}
\begin{figure}[H]
\includegraphics[width=\textwidth, height=23cm]{example-image-a}
\end{figure}
\end{document}


You have a couple of options here:

1. Use \thispagestyle{empty} to remove printing of the page number.

2. Use eso-pic (or something similar) to insert the over-sized image in the ForeGround and therefore overwrite the page number; here's an example:

\documentclass{article}

\usepackage{graphicx,eso-pic}

\begin{document}

\mbox{}% Add something on the page
\AtTextUpperLeft{%
\raisebox{-\height}{\includegraphics[width=\textwidth, height=23cm]{example-image-a}}%
}%
}%

\clearpage % Move to next page

The rest of your document goes here \ldots

\end{document}


Regardless of the choice, using a figure placed Here will overflow to the following page if it doesn't fit on the current one, unless you adjust the height to fit within the text block.

• For the first solution I had to add \pagebreak \thispagestyle{empty} \begin{figure} (overflowing figure).... for it to work in the right page. – jsb Sep 13 '19 at 13:29