# Error in footnote inside figure caption

I am trying to insert a footnote inside a figure caption, but I am getting the following errors:

*Argument of \@caption has an extra }.*

*Paragraph ended before \@caption was complete.*


There aren't any visible mistakes in the compiled document, but I'm curious why this error keeps appearing.

A more complet code follows.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{wrapfig}
\usepackage[portuguese]{babel}
\renewcommand\contentsname{Sumário}

\begin{document}

\begin{figure}[h]
\begin{centering}
\includegraphics[width=10cm]{FOTO_FRENTE_SIMAO.JPG}
\caption{E.E.B Simão José Hess. Fonte: \footnote{http://escolasimaohess.blogspot.com.br/}}
\end{centering}
\end{figure}

\end{document}

• it makes no sense to have a footnote in the caption. It will not be printed. You have to use \footrnotemark and \footnotetext or a minipage or ... – user2478 Dec 3 '15 at 18:45

The command \footnotetext must be on the same page where the float appears! By the way: \centering is a command and not an environment. And use the optional argument of \caption without the footnote mark. It makes no sense to have it in the list of figures.

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage{url}
\usepackage[portuguese]{babel}
\renewcommand\contentsname{Sumário}

\begin{document}

\begin{figure}[!htb]
\centering
%\includegraphics[width=10cm]{FOTO_FRENTE_SIMAO.JPG}
\caption[E.E.B Simão José Hess.]{E.E.B Simão José
Hess.Fonte:\footnotemark}
\end{figure}

\footnotetext{\url{http://escolasimaohess.blogspot.com.br/}}

\end{document}