I am trying to insert an image in a tabularx using `\insertgraphics{}` and none of the solutions that I found on the internet seem to work. To do this, I am using a class with several commands, that are then called in the Latex Document.

The command to create the image is hardcoded in the class, and the image is inside a folder named `img`. I am getting several errors but the first one is `!Undefined control sequence`.

The class that I use is the following:

```
\NeedsTeXFormat{LaTeX2e}
\ProvidesClass{tccv}
              [2012/11/09 v1.0
 Two Column Curriculum Vitae]

\LoadClass[10pt]{scrartcl}

\setcounter{secnumdepth}{-1}
\RequirePackage[hmargin=1.25cm,vmargin=1.25cm,twocolumn,columnsep=1.25cm]{geometry}
\RequirePackage{bookman,etoolbox,hyperref,needspace,tabularx,xcolor,fontawesome,makecell,graphicx}

\pagestyle{empty}
\setlength\parindent{0pt}
\color[HTML]{303030} % Default foreground color
\definecolor{link}{HTML}{506060} % Hyperlinks
\hypersetup{colorlinks,breaklinks,urlcolor=link,linkcolor=link}
\setkomafont{disposition}{\color[HTML]{0058B6}}
\setkomafont{section}{\scshape\Large\mdseries}

% In tccv \part must contain the subject of the curriculum vitae.
% The command will start a new page and output in onecolumn the
% subject (first and last name) with the hardcoded text
% "Curriculum vitae" under it.
\renewcommand\part[2]{%
  \twocolumn[%
    \vskip-\lastskip%
    \begin{tabularx}{\linewidth}{ c@{\hskip 0.25in} | X | X }
      {\usekomafont{part} \hfill #1} & {#2} & {\begin{minipage}{0.45\textwidth}\includegrafics[width=\textwidth]{img/qrcode.png}\end{minipage}}
    \end{tabularx}
    \bigskip]}

% Renders a personal data box:
%
% |[
% \personal[optional: web site without scheme (no http:// prefix)]
%          {address}{phone number}{email}
% ]|
\newcommand\personal[4][]{%
    %\needspace{0.5\textheight}%
    \newdimen\boxwidth%
    \boxwidth=\dimexpr\linewidth-2\fboxsep\relax%
    \colorbox[HTML]{C7E2F2}{%
    \begin{tabularx}{\boxwidth}{c X}
    \faMapMarker  & {#2}\smallskip\\
    \faPhone     & {#3}\smallskip\\
    \faEnvelope      & \href{mailto:#4}{#4}
    \ifstrempty{#1}{}{\smallskip\\ \faLinkedin & \href{http://www.#1}{#1}}
    \end{tabularx}}}

```

The latex document I am using is:

```
\documentclass{tccv}
\usepackage[english]{babel}
\usepackage{fontawesome}
\usepackage[gen]{eurosym}

\begin{document}

\part{\makecell[r]{Name \\ Surname}}{\personal
    [linkedin.com]
    {Address }
    {+33 555 55 55 55}
    {someone@gmail.com}}

\end{document}

```

The image (can be any QR code) is:
[![enter image description here](https://i.stack.imgur.com/DM9xW.png)](https://i.stack.imgur.com/DM9xW.png)

And the result I am getting is the following:[![enter image description here](https://i.stack.imgur.com/sPpgL.png)](https://i.stack.imgur.com/sPpgL.png)