Here we are going to see how to achieve the same effect of dragging and dropping, not visually, but using the tikz package. At first this may seem as a dull and complicated version of the what you see is what you get abilities; but believe me that once you get used to it, you will be able to do much more things, you will see it as a powerful tool that is even easier and quicker than using the mouse. In short, that you will never look back.

But to start this transitional journey, here I am going to show you one basic
feature: how to overlay images, like if you dragged one on top of the other
.

Consider the following tow images:

The following code highlights the process of overlapping two images in Beamer using TikZ package:

% Overlap images in Beamer
\documentclass{beamer}

% Theme choice
\usetheme{CambridgeUS}

% load the package tikz to manipulate the images
\usepackage{tikz}

\begin{document}

\begin{frame}{Overlap images in Beamer}
% create a center environment, so that the contents appear
% at the center of the frame
\begin{center}

% create a new tikz picture
\begin{tikzpicture}
% load the first image nature1.png as a node called img1
\node (img1) {\includegraphics[height=3cm]{nature1.png}};

% insert a pause so that two slides are created:
% the first containing only nature1.png and the second with
% nature2.png overlapping the first image
\pause

% create a new node with the image nature2.png,
% that is ubicated at the south east of the first node
\node (img2) at (img1.south east)
{\includegraphics[height=3cm]{nature2.png}};
\end{tikzpicture}

\end{center}

\end{frame}

\end{document}

This code creates two slides as shown below:

• Including an image in TikZ is achieved by the \node command where its content has the well known \includegraphics command. The node content is put between curly braces {}.
• Saving nodes corresponds to saving its coordinates and allows us to access to any point of its border. For that, we positioned the second image at the south east of image 1, which corresponds to (img1.south east). Think about it as follows: