FriendsOfShopware / FroshWebP

WebP Support for Shopware
MIT License
35 stars 25 forks source link

Webp support for standard designer elements #96

Closed DeubaIT closed 3 years ago

DeubaIT commented 3 years ago

Actual behaviour

No webp support for standard designer elements like 'Hersteller-Slider, 'Artikel-slider', images on category-listing pages or preview pictures on the product detatil page.

Article_DetailPage Category_Listing

Expected behaviour

Display of the images in webp format.

Environment

Shopware 5.6.9, Shopware Security Plugin 1.1.22, Webp Unterstützung 1.1.3 'Nicht sichtbare Bilder aufschieben / lazy loading 1.2.19 (Maxi Arnicke)' ....

Steps to reproduce

  1. https://www.deubaxxl.de/
  2. https://www.deubaxxl.de/heimwerker/
  3. https://www.deubaxxl.de/plattformwagen-150-kg/32/
DeubaIT commented 3 years ago

We would be happy to give you a short response if information on how to answer the question is missing.

shyim commented 3 years ago

Is the template modified? the listing product boxes should work in default :thinking:

DeubaIT commented 3 years ago

The only modification in listing.tpl is in one block:

{extends file='parent:frontend/listing/listing.tpl'}

{block name="frontend_listing_top_actions"} {include file='frontend/listing/category_cards.tpl'} {$smarty.block.parent} {/block}

So e reset the changes on our test server and check whether the display is then correct.

shyim commented 3 years ago

Yes check it with default theme and no plugins maybe

DeubaIT commented 3 years ago

After a few tests there is the following result:

So, how can we check, which changes causes the issues? The only change in listing.tpl is the following: {block name="frontend_listing_top_actions"} {include file='frontend/listing/....'} {$smarty.block.parent} {/block} We have also made changes in the product_badges.tpl.

Which template files or {block} implements the webp support?

Another problem is that we have implemented our own article slider based on an emotion-plugin example from shopware. How can webp support be integrated into your own components?

Thanks in advance

shyim commented 3 years ago

All templates from the plugin are relevant for that.

To add webp support by own create a picture tag and add a source to the webp image. https://github.com/FriendsOfShopware/FroshWebP/blob/master/Resources/views/frontend/listing/product-box/product-image.tpl#L5-L12

That way it works for all things :)

Splendid-Niklas commented 2 years ago

What about "Hersteller-Slider" / "Manufacturer-Slider" DeubaIT mentioned?