or
tikz
samcarter
I would like to place an image along a tikz path in such a way that it rotates with the loops of the path, e.g. in the example below the duck should be head down when flying though the looping.

MWE without rotation:

```
\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{calc,decorations.markings}

\setbeamertemplate{background}{%
  \begin{tikzpicture}[
    remember picture,
    overlay,
    decoration={
      markings, 
      mark=at position \thepage/10 with {
        \node{\includegraphics[width=2cm]{example-image-duck}};
      }
    }
  ]
    \path[postaction=decorate,draw] (-0.0024, -0.846) .. controls (2.9731, -2.564) and (4.9397, -0.8115) .. (4.9397, -4.2473) .. controls (4.9397, -8.2498) and (-2.9933, -2.7915) .. (0.9993, -3.0728) .. controls (10.1424, -3.7168) and (9.4455, -9.435) .. (6.1477, -7.1566) .. controls (3.4609, -5.3004) and (10.1189, 2.4134) .. (13.8065, -10.4522);
  \end{tikzpicture}%
}

\begin{document}

\begin{frame}
  \pause[10]
\end{frame}

\end{document}
```

![document.gif](/image?hash=d01d5d4b1d22a5a09778078d947b40623bbd369dec6e18166da806f590ee9944)
Top Answer
marmot
Of course. You should just ask the authors of the Christmas Exravaganza. ;-)

```
\documentclass{beamer}

\usepackage{tikz}
\usetikzlibrary{calc,decorations.markings}

\setbeamertemplate{background}{%
  \begin{tikzpicture}[
    remember picture,
    overlay,
    decoration={
      markings, 
      mark=at position \thepage/10 with {
        \path (-0.1cm,0) coordinate (aux0) (0.1cm,0) coordinate(aux1)
		(0,0) coordinate(aux2);
		\pgftransformreset
		\path let \p1=($(aux1)-(aux0)$), \n1={atan2(\y1,\x1)} in 
		(aux2) node[rotate=\n1]{\includegraphics[width=2cm]{example-image-duck}};
      }
    }
  ]
    \path[postaction=decorate,draw] (-0.0024, -0.846) .. controls (2.9731, -2.564) and (4.9397, -0.8115) .. (4.9397, -4.2473) .. controls (4.9397, -8.2498) and (-2.9933, -2.7915) .. (0.9993, -3.0728) .. controls (10.1424, -3.7168) and (9.4455, -9.435) .. (6.1477, -7.1566) .. controls (3.4609, -5.3004) and (10.1189, 2.4134) .. (13.8065, -10.4522);
  \end{tikzpicture}%
}

\begin{document}

\begin{frame}
  \pause[10]
\end{frame}

\end{document}
```

![ani.gif](/image?hash=1d06a2ee1dfee9358e3dc25eefef06c9156974ae12f8dd1e4820a650dd5cce84)
Rotate image used in tikz path decoration
samcarter replying to marmot
Now I think I get the reference! That's CarLaTeX driving through Utah, isn't it? Shame on me for forgetting your nice solution for this scene!
samcarter replying to CarLaTeX
Ah, yes! Now that you mention it, I read this as well.
samcarter
@marmot Fantastic answer! Thanks a lot! Such a Q&A site is really handy :)
CarLaTeX
:)
CarLaTeX replying to marmot
The important thing is that it works
Skillmon
@marmot great example image!
marmot replying to CarLaTeX
I had to learn how to mark codes and add figures. Now I know something that works, whether this is the intended way, I do not know.
marmot replying to CarLaTeX
I added it.
CarLaTeX
@marmot I don't see you .gif
CarLaTeX
@marmot @samcarter ^^^
CarLaTeX
Perhaps questions cannot be upvoted, unless they are Meta, I remember to have read something somewhere 
marmot replying to CarLaTeX
I have the same problem.
samcarter replying to CarLaTeX
No idea. Maybe questions with ducks don't need stars, they are cute on their own?
CarLaTeX
@samcarter Why can't I upvote this question?