I've written a simple (automatized) report which includes many graphics by simple \includegraphics. Now I'd like to generate a table of contents link for each graphics which I can click due to package hyperref. So I wrote

\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
\tableofcontents
\newpage
\section{Start}
\begin{center}
\includegraphics{mwe/example-image-a.pdf}
\end{center}

\begin{center}
\includegraphics{mwe/example-image-a.pdf}
\end{center}

\begin{center}
\includegraphics{mwe/example-image-a.pdf}
\end{center}

\begin{center}
\includegraphics{mwe/example-image-b.pdf}
\end{center}

\begin{center}
\includegraphics{mwe/example-image-a.pdf}
\end{center}
\end{document}

(not sure how MWE works :/). However, in the generated table of contents in the PDF, the links in the TOC get me to the wrong pages not showing the correct graphics. In the example clicking on TOC entry "B" does not get me to graphics "B".

Is there a way to get correct references to my images?

• For the sake of the community, could you provide us with a minimal working example (MWE) that shows your setup? Don't use myplot.pdf, but rather example-image and such from mwe. – Werner Aug 5 '14 at 13:50

You have to set an anchor using \phantomsection. And I would use a minipage or \parbox to ensure that both \phantomsection and \includegraphics are on the same page:

\documentclass{article}
\usepackage{graphicx}
\usepackage{hyperref}
\begin{document}
\tableofcontents
\newpage
\section{Start}
\begin{center}
\parbox{\linewidth}{
\centering
\phantomsection
\includegraphics{mwe/example-image-a.pdf}
}
\end{center}
\begin{center}
\parbox{\linewidth}{
\centering
\phantomsection
\includegraphics{mwe/example-image-a.pdf}
}
\end{center}
\begin{center}
\parbox{\linewidth}{
\centering
\phantomsection
\includegraphics{mwe/example-image-a.pdf}
}
\end{center}
\begin{center}
\parbox{\linewidth}{
\centering\phantomsection
\includegraphics{mwe/example-image-b.pdf}