How to insert a background image in a beamer frame?
I used images Sir Isaac Newton (rename it as newton.jpg) and Kitten (rename it as kitten.jpg)
The code snippet below is self-explanatory and I compiled using pdflatex.exe because of .jpg
format.
\documentclass[bigger]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{graphicx}
%Global Background must be put in preamble
\usebackgroundtemplate%
{%
\includegraphics[width=\paperwidth,height=\paperheight]{newton.jpg}%
}
\begin{document}
\begin{frame}{Introduction}
\begin{itemize}
\item 1
\item 2
\item 3
\end{itemize}
\end{frame}
% Local background must be enclosed by curly braces for grouping.
{
\usebackgroundtemplate{\includegraphics[width=\paperwidth]{kitten.jpg}}%
\begin{frame}{Kitten}
\begin{itemize}
\item 1
\item 2
\item 3
\end{itemize}
\end{frame}
}
\begin{frame}{Summary}
\begin{itemize}
\item 1
\item 2
\item 3
\end{itemize}
\end{frame}
\end{document}
Write \usebackgroundtemplate
before the frame, not within:
\end{frame}
% Now we install the new template for the following frames:
{\usebackgroundtemplate{%
\includegraphics[width=\paperwidth,height=\paperheight]{crayons}}
\begin{frame}
...
\end{frame}}
% Now we install another template, effective from now on:
\usebackgroundtemplate{...}
Ensure that \includegraphics
is able to find the image file, since you used ../images/crayons.png
.
Edit: The \usebackgroundtemplate
should be enclosed with curly braces along with frame (or frames) which it should affect