Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Make background image bigger (1080x440) as it's preferred, add opengraph https://developers.facebook.com/docs/sharing/best-practices#images

NyanKiyoshi41dd503cfb32
diff --git a/saleor/settings.py b/saleor/settings.py
index d9a8e30e5f..bc8a495f2b 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -402,7 +402,7 @@ VERSATILEIMAGEFIELD_RENDITION_KEY_SETS = {
('product_list', 'thumbnail__255x255'),
('product_list_2x', 'thumbnail__510x510')],
'background_images': [
- ('header_image', 'thumbnail__960x320')]}
+ ('header_image', 'thumbnail__1080x440')]}
VERSATILEIMAGEFIELD_SETTINGS = {
# Images should be pre-generated on Production environment
diff --git a/templates/product/product_list_base.html b/templates/product/product_list_base.html
index 29fb2c3456..f8960b9a9c 100644
--- a/templates/product/product_list_base.html
+++ b/templates/product/product_list_base.html
@@ -26,7 +26,8 @@
<meta name="description" content="{{ seo_description }}">
{% if object.background_image %}
- <meta property="og:image" content="{{ object.background_image }}">
+ <meta property="og:image"
+ content="{% get_thumbnail object.background_image size='1080x440' method="thumbnail" rendition_key_set="background_images" %}">
{% else %}
<meta property="og:image" content="{% static "images/block1.png" %}">
{% endif %}
@@ -115,7 +116,7 @@
{% block topcontent %}
{% if object.background_image %}
<div class="row" id="product-list-image"
- style="background-image: url({% get_thumbnail object.background_image size='960x320' method="thumbnail" rendition_key_set="background_images" %})"></div>
+ style="background-image: url({% get_thumbnail object.background_image size='1080x440' method="thumbnail" rendition_key_set="background_images" %})"></div>
{% endif %}
{% endblock topcontent %}