# How to add href{} to caption in figure environment

Can anyone tell me how to add href{} to \caption{} in figure environment? I keep getting TEX capacity exceeded error. My link in href{} contains underscore characters, escaping them doesn't help..

• Welcome to TeX.SE. Please clarify what you're trying achieve with \href.
– Mico
May 7 '21 at 0:10

Did you want something like this--

Well, that can be achieved with this--

\documentclass{article}

\usepackage{graphicx}

\begin{document}

\begin{figure}[h]
\centering
\includegraphics[width=15em]{example-image-golden}