Image not charging

New Member
3 0 1


I recently changed my theme on Shopify and the new one I hand coded is missing an important option, but I have an error:

when writing a blog post you can choose an image that can appear as a banner, this option is not available on this theme so I added it by hand (by copying the code snippet from the old theme).

Only, the image does not load in 90% of the cases, but it happens that it works.

Would you have a solution?

Here is the code I added:

{% if article.image %}
    <div id="blog-banniere">
        {% assign img_url = article.image | img_url: '1x1' | replace: '_1x1.', '_{width}x.' %}
            <img itemprop="image" class="lazyload"
            src="{{ article.image | img_url: '300x300' }}"
            data-src="{{ img_url }}"
          data-widths="[360, 540, 720, 900, 1080, 1296, 1512, 1728, 2048]"
          data-aspectratio="{{ article.image.aspect_ratio }}"
          alt="{{ article.image.alt }}">
{% endif %}


Replies 0 (0)