[Tex/LaTex] Beamer: positioning background image in beamer

beamergraphics

I have been trying for a while to fix the image to the center for the frame, but it is attached to the top. I use the following code:

\documentclass[bigger]{beamer}
\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\usepackage{graphicx}
\begin{document}
{\usebackgroundtemplate{\centering \includegraphics[width=\paperwidth]{./Figures/Planck_CMB.jpg}}%
\begin{frame}


\end{frame}
}
\end{document}

enter image description here

Someone can help me with it?

Best Answer

using a picture environment might help:

\documentclass[bigger,t]{beamer}

\usepackage[utf8]{inputenc}
\usepackage[T1]{fontenc}

\begin{document}

{
  \usebackgroundtemplate{%
    \begin{picture}(100,220)
      \includegraphics[width=\paperwidth]{Planck_CMB}
    \end{picture}
  }%
  \begin{frame}
    RIP Stephen Hawking!
  \end{frame}
}

\begin{frame}
  text
\end{frame}

\end{document}

enter image description here