diff --git a/Resources/config/jb_phumbor-default-config.yaml b/Resources/config/jb_phumbor-default-config.yaml
index b8ed020..60901a7 100644
--- a/Resources/config/jb_phumbor-default-config.yaml
+++ b/Resources/config/jb_phumbor-default-config.yaml
@@ -11,6 +11,11 @@ jb_phumbor:
resize: { width: 80, height: 0 }
filters:
- { name: 'quality', arguments: [60] }
+ image_video_poster:
+ resize: { width: 992, height: 0 }
+ filters:
+ - { name: 'quality', arguments: [ 80 ] }
+ - { name: 'format', arguments: [ 'jpeg' ] }
image_xxxs:
resize: { width: 160, height: 0 }
filters:
diff --git a/Resources/views/Macros/responsiveVideo.html.twig b/Resources/views/Macros/responsiveVideo.html.twig
index 9cf17f2..ed4cf58 100644
--- a/Resources/views/Macros/responsiveVideo.html.twig
+++ b/Resources/views/Macros/responsiveVideo.html.twig
@@ -15,6 +15,7 @@
'loop': true,
'muted': true,
'playsinline': true,
+ 'poster': true,
} %}
{% set options = options ? defaultVideoOptions|merge(options) : defaultVideoOptions %}
@@ -25,6 +26,7 @@
{% if options.muted %}muted=""{% endif %}
{% if options.loop %}loop=""{% endif %}
{% if options.playsinline %}playsinline=""{% endif %}
+ {% if options.poster %}poster="{{ thumbor(video.url, 'image_video_poster') }}"{% endif %}
{% if options.data_attributes is not empty %}
{% for name, value in options.data_attributes %}
data-{{ name }}="{{ value }}"
@@ -32,7 +34,7 @@
{% endif %}
>
{%- for transformation, type in options.transformations -%}
-
+
{%- endfor -%}"
{% endif %}