\captionof{figure}{Your caption}
The rule is a replacement for the actual figure. The word figure in the captionof command gives the type of the figure.
Please read up on some introductory material.
Do you even test the complete and fully working minimal examples i post?
Please click on »Open in writelatex« this time.
Code: Select all
\documentclass{article}
\usepackage{caption}
\usepackage{graphicx}
\begin{document}
\listoffigures
\bigbreak
\begin{minipage}{\linewidth}
\begin{center}
\includegraphics[width=\textwidth]{example-image}
\captionof{figure}{this is my caption}
\end{center}
\end{minipage}
\end{document}