The simplest way is
\begin{tabular}{@{}c@{}}\includegraphics{...}\end{tabular}
More complex, but perhaps handier,
\usepackage[export]{adjustbox}
and then
\includegraphics[valign=M]{...}
Example:
\documentclass{article}
\usepackage[export]{adjustbox}
\usepackage{graphicx}
\begin{document}
Some text \includegraphics[height=3ex]{example-image-1x1} some text
\bigskip
Some text
\begin{tabular}{@{}c@{}}\includegraphics[width=3ex]{example-image-1x1}\end{tabular}
some text
\bigskip
Some text \includegraphics[height=3ex,valign=M]{example-image-1x1} some text
\bigskip
Some text \includegraphics[height=3ex,valign=m]{example-image-1x1} some text
\end{document}
If you want full control on the amount of raising or lowering, use \raisebox
:
\raisebox{-.5\height}{\includegraphics{...}}
Instead of \height
or a multiple thereof, you can use an explicit length.
\begin{tabular}{@{}c@{}}\includegraphics{...}\end{tabular}
adjustbox
package which adds keys to\includegraphics
for vertical alignement