diff --git a/templates/layout-paragraphs-builder-component-menu--mercury-editor.html.twig b/templates/layout-paragraphs-builder-component-menu--mercury-editor.html.twig index aefc2f550b12a2a12422c866cfd4f6722d6e2bd6..15ef19a08c74a969b97ff724c5b9fa30b6445828 100644 --- a/templates/layout-paragraphs-builder-component-menu--mercury-editor.html.twig +++ b/templates/layout-paragraphs-builder-component-menu--mercury-editor.html.twig @@ -35,7 +35,13 @@ {% for type in types.content %} <div class="lpb-component-list__item type-{{type.id}}"> <a{{type.link_attributes.setAttribute('href',type.url)}}> - {% if type.image %}<img src="{{ type.image }}" alt=""/> + {% if type.image %} + <style> + .lpb-component-list__item.type-{{ type.id }} a::before { + background: url({{ type.image }}); + background-size: cover; + } + </style> {% endif %} {{ type.label }}</a> </div>