# How to add image to beamer footline and keep it align with the text?

I want to add an image to my footline and aligned with the text of the same footline.

I have the following in my beamertheme.

\def\logo{%
\resizebox{!}{2.5ex}{\includegraphics{logo-small.png}}
}

\mode<presentation>
\defbeamertemplate*{footline}{example theme}
{%
\begin{beamercolorbox}[wd=\paperwidth,ht=2.5ex,dp=1.125ex,%
leftskip=.3cm,rightskip=.3cm plus1fil]{separation line}
\insertshortauthor\hfill\insertshorttitle\hfill\logo
\end{beamercolorbox}
}
\mode

-
Welcome to TeX.sx! A tip: If you indent lines by 4 spaces, they'll be marked as a code sample. You can also highlight the code and click the "code" button (with "{}" on it). –  lockstep Oct 9 '11 at 14:25
Well, what kind of alignment do you want exactly? You can modify the image height using \raisebox{<amount>}{<content>}. Please always add a complete but minimal working example (MWE). Thanks. –  Martin Scharrer Oct 9 '11 at 14:28
Thanks! That worked :D –  Jose Monreal Oct 9 '11 at 15:38
@MartinScharrer: Since your suggestion solved the issue, perhaps you should post that as an answer so this can be marked as answered. –  Peter Grill Oct 10 '11 at 22:02
@PeterGrill: Done –  Martin Scharrer Oct 10 '11 at 23:53

You can modify the image height using \raisebox{<amount>}{<content>}. The \resizebox{!}{2.5ex}{...} is actually not required, you can use the width key of \includegraphics macro for the resizing:

\def\logo{%
\raisebox{<amount>}{\includegraphics[width=2.5ex]{logo-small.png}}%
}


You could also load the adjustbox package with the export option, then you can use the raise key with \includegraphics:

\def\logo{%
\includegraphics[width=2.5ex,raise=<amount>]{logo-small.png}%
}

-
You could also load the adjustbox package with the export option – cool, didn't know about that and just figured that there is a new version of adjustbox available. Very useful! –  Daniel Oct 11 '11 at 7:30