diff --git a/composer.json b/composer.json index 4ff41fc..0f6be56 100644 --- a/composer.json +++ b/composer.json @@ -6,7 +6,7 @@ "thumbnail" ], "description": "Automatically calculate the best thumbnail size. This means you don't have to worry about the \"sizes\" attribute for the images. Additionally, you gain a score.", - "version": "1.1.0", + "version": "1.1.1", "type": "shopware-platform-plugin", "license": "mit", "authors": [ @@ -16,7 +16,7 @@ } ], "require": { - "shopware/core": "~6.4.10" + "shopware/core": ">=6.4.10||<6.4.18" }, "extra": { "shopware-plugin-class": "Frosh\\LazySizes\\FroshLazySizes", diff --git a/src/Resources/views/storefront/utilities/thumbnail.html.twig b/src/Resources/views/storefront/utilities/thumbnail.html.twig index 376d1b3..d995061 100644 --- a/src/Resources/views/storefront/utilities/thumbnail.html.twig +++ b/src/Resources/views/storefront/utilities/thumbnail.html.twig @@ -1,28 +1,3 @@ -{% sw_extends "@Storefront/storefront/utilities/thumbnail.html.twig" %} - -{% block thumbnail_utility %}{% apply spaceless %} - {% if lazysizes is not defined %} - {% set lazysizesThroughCss = null %} - {% for item in [sectionClasses, blockClasses] %} - {% if item is defined %} - {# Yes, item is an array! - Therefore we need to combine any entry and convert it back to array #} - {% set item = item|join(' ')|split(' ') %} - - {% if 'no-lazysizes' in item %} - {% set lazysizesThroughCss = false %} - {% elseif 'lazysizes' in item %} - {% set lazysizesThroughCss = true %} - {% endif %} - {% endif %} - {% endfor %} - {% endif %} - - {% set lazysizes = lazysizes ?? lazysizesThroughCss ?? true %} - - {% if lazysizes %} - {% sw_include '@FroshLazySizes/storefront/utilities/thumbnail-lazysize.html.twig' %} - {% else %} - {{ parent() }} - {% endif %} -{% endapply%}{% endblock %} +{% apply spaceless %} + {% sw_include '@FroshLazySizes/storefront/utilities/thumbnail-lazysize.html.twig' %} +{% endapply %}