How to include picture in banking style with exactly position

Update (moderncv v2.0)

With moderncv v2.0, the command to be patched is no more \maketitle but \makehead and the length to be changed is now \makeheaddetailswidth, so the correct patches for this version are

\patchcmd{\makehead}
  {\hfil}
  {\hspace*{0.15\textwidth}}
  {}
  {}
\patchcmd{\makehead}
  {\setlength{\makeheaddetailswidth}{0.8\textwidth}}
  {\setlength{\makeheaddetailswidth}{0.67\textwidth}}
  {}
  {}
\patchcmd{\makehead}
  {\\[2.5em]}
  {\hfil\raisebox{-.7cm}{\framebox{\includegraphics[width=\@photowidth]{\@photo}}}\\[2.5em]}
  {}
  {}

Original answer (works with older versions of moderncv)

Add the following lines in your preamble

\patchcmd{\maketitle}
  {\hfil}
  {\hspace*{0.15\textwidth}}
  {}
  {}
\patchcmd{\maketitle}
  {\setlength{\maketitlewidth}{0.8\textwidth}}
  {\setlength{\maketitlewidth}{0.67\textwidth}}
  {}
  {}
\patchcmd{\maketitle}
  {\\[2.5em]}
  {\hfil\raisebox{-.7cm}{\framebox{\includegraphics[width=\@photowidth]{\@photo}}}\\[2.5em]}
  {}
  {}

and, to insert the picture, use

\photo[64pt][0.4pt]{picture}

MWE:

\documentclass[11pt,a4paper,sans]{moderncv}
\moderncvstyle{banking}
\moderncvcolor{blue}

\usepackage[utf8]{inputenc}
\usepackage[scale=0.75]{geometry}

\patchcmd{\maketitle}
  {\hfil}
  {\hspace*{0.15\textwidth}}
  {}
  {}
\patchcmd{\maketitle}
  {\setlength{\maketitlewidth}{0.8\textwidth}}
  {\setlength{\maketitlewidth}{0.67\textwidth}}
  {}
  {}
\patchcmd{\maketitle}
  {\\[2.5em]}
  {\hfil\raisebox{-.7cm}{\framebox{\includegraphics[width=\@photowidth]{\@photo}}}\\[2.5em]}
  {}
  {}

% personal data
\name{John}{Doe}
\title{Resumé title}
\address{street and number}{postcode city}{country}
\phone[mobile]{+1~(234)~567~890}
\phone[fixed]{+2~(345)~678~901}
\phone[fax]{+3~(456)~789~012}
\email{[email protected]}
\homepage{www.johndoe.com}
\social[linkedin]{john.doe}
\social[twitter]{jdoe}
\social[github]{jdoe}
\extrainfo{additional information}

\photo[64pt][0.4pt]{picture}

\begin{document}

\makecvtitle

\end{document} 

Output:

enter image description here


Put the picture in any convenient place in the source and use

\begin{picture}(0,0)
\put(20,30){\includegraphics[scale=1]{picture}}
\end{picture}

The (0,0) means that the construct takes up no space and will over (or under) print any surrounding text, then adjust the coordinates (20,30) to put it where you like, default units pt but you can change \unitlength so that you can use cm or in or whatever.

Tags:

Moderncv