[Tex/LaTex] Add a second (or multiple) pictures to a CV

floatsmoderncv

I plan to add a second image to my CV, a QR code for instance, in addition to a profile picture, as it is shown below in the example from the web. The webpage doesn't offer any latex code, though.

In ModernCV, there's the \photo command, which sets exactly one photo. How can I add a second one?

enter image description here

Best Answer

You can use eso-pic and overlay the photo:

\usepackage{eso-pic}
\newcommand\AtPageUpperMyleft[1]{\AtPageUpperLeft{%
 \put(\LenToUnit{1.5cm},\LenToUnit{-3.5cm}){#1}%
 }}%

\AddToShipoutPictureBG*{%
\AtPageUpperMyleft{\fboxsep1.5pt\fcolorbox{red}{white}%
{\includegraphics[width=60pt,height=3cm,keepaspectratio]{ctanlion}}}
}

Adjust the dimension 1.5cm and -3.5cm as suitable.

\documentclass[12pt,letterpaper,sans]{moderncv}
\moderncvstyle{classic}
\moderncvcolor{red}
\usepackage[scale=0.85]{geometry}
%% ↓
\usepackage{eso-pic}
\newcommand\AtPageUpperMyleft[1]{\AtPageUpperLeft{%
 \put(\LenToUnit{1.5cm},\LenToUnit{-3.5cm}){#1}%
 }}%

\AddToShipoutPictureBG*{%
\AtPageUpperMyleft{\fboxsep1.5pt\fcolorbox{red}{white}%
{\includegraphics[width=60pt,height=3cm,keepaspectratio]{ctanlion}}}
}


% personal data
\name{}{}
\title{}
\address{123 Main Street}{Anytown, USA 20192}
\phone[mobile]{(555) 555-5555}
\email{dasasd@gmail.com}
\homepage{www.asdasd.com}
\social[linkedin]{asdasdasd}
\social[github]{asdasdasd}
\photo{logo}

\begin{document}
\makecvtitle

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{Selected Projects}

\end{document}

enter image description here