# Align image with bottom of frame (beamer)

I have 3 images that are supposed to appear "replacing" each other on a beamer frame. I've been able to do that with overprint and onslide with no trouble. The problem is that one of the images is taller than the rest, so it appears shifted from the others. Since an image is better than a thousand words, I will illustrate what I mean bellow. The code is:

\begin{frame}{Problem description}
\begin{overprint}
\onslide<1>\centering\includegraphics[scale=0.3]{figs/img_1.png}
\onslide<2>\centering\includegraphics[scale=0.3]{figs/img_2.png}
\onslide<3>\centering\includegraphics[scale=0.3]{figs/img_3.png}
\end{overprint}
\end{frame}


And my images are the ones below:

The third image does not align because it is a little bit taller than the previous 2.

I believe that if I align the images using their bottom, I might get the "effect" of superposition that I want. Is there an easy way to do so?

As simple hack, you could use the tallest image in a \vphantom to make sure all your slides have the same height.

However the vertical alignment isn't your only problem: your last image is also wider.

\documentclass{beamer}

\begin{document}

\begin{frame}{Problem description}

\hfill\vphantom{\includegraphics[scale=0.3]{img_3}}%
\includegraphics<1>[scale=0.3]{img_1}%
\includegraphics<2>[scale=0.3]{img_2}%
\includegraphics<3>[scale=0.3]{img_3}%
\hspace{3cm}

\end{frame}

\end{document}


Or you could use a bottom aligned frame (it looks a bit empty like this, but maybe your real frame has more content):

\documentclass{beamer}

\begin{document}

\begin{frame}[b]
\frametitle{Problem description}

\hfill
\includegraphics<1>[scale=0.3]{img_1}%
\includegraphics<2>[scale=0.3]{img_2}%
\includegraphics<3>[scale=0.3]{img_3}%
\hspace{3cm}

\end{frame}

\end{document}


• The first solution definately worked for me! Thank you! Sep 15 at 22:37
• @EduardoAlvesdaSilva You're welcome! Sep 15 at 22:42