Is there a way to easily add an image to a section slide in the Metropolis theme for beamer?

Basically, I have this using \section{Selection Bias}:

enter image description here

And want this:

enter image description here

I found a related answer here, but it seems like there might be a more efficient way to do this without renewing the command every time, and I'd rather not rebuild the title part because I like having the indicator bar, etc.

  • 1
    Please, can you add your complete code? This way it's easier to help you.
    – Sebastiano
    Commented Dec 2, 2017 at 21:07
  • Yes, sorry @Sebastiano. The code in the answer is sufficient to run, but next time I'll include from the start.
    – atkat12
    Commented Dec 3, 2017 at 0:08

1 Answer 1


If you don't like the renewcommand, you could pass the image name as optional argument to the section page template.

\usetheme{moloch}% modern fork of the metropolis theme

%%% Section page template with picture

\defbeamertemplate*{section page}{mytheme}[1][]{
    \usebeamercolor[fg]{section title}
    \usebeamerfont{section title}
    \usebeamertemplate*{progress bar in section page}
      \usebeamercolor[fg]{subsection title}%
      \usebeamerfont{subsection title}%

%%% Define a command to include picture in section, 
%%% make section, and revert to old template

   \setbeamertemplate{section page}[mytheme][#2]
   \setbeamertemplate{section page}[mytheme]

%%% Document





enter image description here

  • Thank you @samcarter! Works great. I just added a short command, sectionpic, to insert a photo section and revert the template in a single command, so you don't have to manually do this every time.
    – atkat12
    Commented Dec 3, 2017 at 0:06
  • Is there a way to change the image size locally? I mean not all images work well with .4\textwidth.
    – Scholar
    Commented Apr 28, 2021 at 9:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .