\documentclass[a4paper,10pt]{article}
%-----------------------------------------------------------
\usepackage[margin=10mm]{geometry}
\raggedbottom
\usepackage{palatino}
\fontfamily{SansSerif}\selectfont
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\usepackage[hidelinks]{hyperref}
\usepackage{xcolor}
\definecolor{mygrey}{gray}{0.75}
\hypersetup{
colorlinks,
linkcolor={red!50!black},
citecolor={blue!50!black},
urlcolor={blue!80!black}
}
\usepackage{booktabs, makecell, tabularx}
\renewcommand\arraystretch{1.3}
\usepackage{verbatim}
\usepackage{pbox}
\usepackage{enumitem}
\setlist[itemize]{leftmargin=*}
\usepackage{url}
\setlength{\parindent}{0pt}
\pagestyle{empty}
\pdfgentounicode=1
%-----------------------------------------------------------
%Custom commands
\newcommand{\resheading}[1]{\medskip
\colorbox{mygrey}{\begin{minipage}{\dimexpr\textwidth-2\fboxsep\relax}\small
\textbf{#1 \vphantom{p\^{E}}}
\end{minipage}}
\par\medskip}
\newcommand{\ressubheading}[3]{
\begin{tabular*}{\textwidth}{l @{\extracolsep{\fill}} r}
\textsc{\textbf{#1}} & \textsc{\textit{[#2]}} \\
\end{tabular*}\vspace{-8pt}}
%-----------------------------------------------------------
\begin{document}
\linespread{1.25}
\begin{center} \fontsize{15}{15} \textbf{NAME} \end{center}
\photo{2.5cm}{photo.jpg}
Roll No.: \textbf{XXXX/XX/XX} \\
Email-id : \textbf{[email protected]} \\
Mobile No.: \textbf{9999999999} \\
\href{https://www.linkedin.com}{LinkedIn Profile} \\
\end{document}
I want to insert my photo below the name and on the right side inline with the email and number etc. I tried this - \photo{2.5cm}{photo.jpg}. But undefined control sequence error is occuring. I imported the graphicx module.
You could use
minipages to place an image next to the other text: