Rotate background image

We are using the gateway theme, is it possible to have the background image be a random image?

Preferably a background image slider, is this possible?


1 Like

Create a child theme and overwrite /templates/partials/header.html.twig in your child theme.

.home-header-bg {
  background:url( '{{ theme_url }}/img/{{ site.header.background }}' ) #ffffff no-repeat center center fixed;
  -webkit-background-size: cover;
  -moz-background-size: cover;
  -o-background-size: cover;
  background-size: cover;

should be something like

background:url( '{{ | randomize | first }}' )

(not tested, no guarantee, but the direction should be correct.

1 Like

You could use Vegas