referencing an image in latex code example
Example 1: include image latex
\documentclass{article}
\usepackage{graphicx}
\begin{document}
\begin{figure}
\includegraphics[width=\linewidth]{boat.jpg}
\caption{A boat.}
\label{fig:boat1}
\end{figure}
Figure \ref{fig:boat1} shows a boat.
\end{document}
Example 2: figure reference latex
\ref{marker}
This prints the number assigned to the object labeled by marker