I want to add a background to the final page of the document. I have two images, one that I have added on the first page of the document works perfectly, but I am not sure how to add the second one.
\documentclass{book}
\usepackage{graphicx}
\usepackage[pages=some]{background}
\backgroundsetup{ %for first-page image
scale=1,
color=black,
opacity=0.5,
angle=0,
contents={%
\includegraphics[width=\paperwidth,height=\paperheight]{example-image-a}
}%
}
\title{TITLE}
\author{AUTHOR}
\date{DATE}
\begin{document}
\BgThispage % first-page image
\maketitle
\tableofcontents
\include{chapter}
%Here I want to add second-page image.
\end{document}
\AddToHook{shiput/background}{...}
to check for the last page.