0

\href{https://google.com}{\includegraphics[scale=0.05]{logo.png}} - not working

\href{https://google.com}{\includegraphics[scale=0.05]{logo.png}someTextHere} - working

How to make it work only with image

1

With pdflatex/lualatex it should work. With xelatex you need \XeTeXLinkBox:

\documentclass{article}
\usepackage{hyperref}
\usepackage{graphicx}
%

\begin{document}


\href{https://google.com}{\XeTeXLinkBox{\includegraphics[scale=0.05]{example-image.png}}} 

\href{https://google.com}{\includegraphics[scale=0.05]{example-image.png}xxx}

\end{document}

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.