Skip to content
Snippets Groups Projects
background-image.twig 263 B
<style>

  {% for source in image.sources|reverse %}
  @media only screen and {{ source.media | replace({'all and': ''}) }} {
    .{{ image_class }} {
      background-image: url("{{ source.srcset | replace({ ' 1x': '' }) }}");
    }
  }}
  {% endfor %}
</style>