Adjust photo macro to change format [closed]

Using the LaTeX CV template available under this Link (login: gafavekor@cyber-host.net ; pw: 123456) and I've realized that the picture is automatically cut to a vertical format. I would just like my picture to be displayed as is, which is horizontal. As far as I can tell, the template uses these commands to insert the picture:

\newcommand{\photo}[2]{\def\@photo{#2}\def\@photodiameter{#1}}
\photo{2.5cm}{DCE2small2}


To use my own, I've deleted the DCE2small2.jpg and inserted my picture which I then named DCE2small2.jpg.

How can I change this to maintain the format of the .jpg?

closed as unclear what you're asking by Kurt, Phelype Oleinik, user156344, Raaja, marmotMay 7 at 4:23

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• Please do not post just a code snippet, but a complete MWE. To access the linked document, a login is required. – epR8GaYuh May 6 at 15:29
• Why not just use \includegraphics? – erik May 6 at 16:09
• @erik I am not using \includegraphics because then, the figure does not stay in the same row as the social information (name, tel, email etc.). I found solutions like the package wrapfig, but they require the text to be written somewhere below the \includegraphics part. Currently, it is done very differently ( \photo{} \socialinfo{} are before \begin{document}) and I assumed that it's easier just to change the macro slightly. – cheesus May 6 at 19:05
• Are you using the AltaCV class? If so, add the normalphoto option to documentclass. – erik May 6 at 19:45
• @erik the documentclass is defined by \documentclass[localFont,alternative]{documentMETADATA} – cheesus May 6 at 19:56

The template is based on yaac-another-awesome-cv, and places the photo in a shaped defined by TikZ.

\newcommand\idphoto{
\tikz\path[fill overzoom image={\@photo}]rectangle (\linewidth,1.2\linewidth);
}


If using a photo that's wider than it is tall, the photo is masked.

% !TEX TS-program = lualatex
\name{Jane}{Doe}
\tagline{Electrical Engineer | Instructor}
\photo{4cm}{example-image-16x9}
\socialinfo{
\email{email@email.edu}
}
\begin{document}
\end{document}


To avoid this, you can redefine \idphoto to simply use \includegraphics.

% !TEX TS-program = lualatex
\name{Jane}{Doe}
\tagline{Electrical Engineer | Instructor}
\photo{4cm}{example-image-16x9}
\socialinfo{
\email{email@email.edu}
}
\makeatletter
\renewcommand\idphoto{%
\includegraphics[width=\@photodiameter,height=\@photodiameter,keepaspectratio]{\@photo}}
\makeatother
\begin{document}