vuestorefront / vue-storefront-1

The open-source frontend for any eCommerce. Built with a PWA and headless approach, using a modern JS stack. We have custom integrations with Magento, commercetools, Shopware and Shopify and total coverage is just a matter of time. The API approach also allows you to merge VSF with any third-party tool like CMS, payment gateways or analytics. Newest updates: https://blog.vuestorefront.io. Always Open Source, MIT license.
https://www.vuestorefront.io
MIT License
19 stars 13 forks source link

Feature Request - Support WebP images and Switch to lazysizes over vue-lazyload #310

Open tonyisworking opened 5 years ago

tonyisworking commented 5 years ago

What is the motivation for adding / enhancing this feature?

WebP Image formats are supported by multiple browsers now, supporting it should be good for improved performance.

Switching to lazysizes instead of vue-lazyload will be needed for WebP image formats as Lazysizes supports picture element, where vue-lazyload does not. Picture element can be used to fallback to regular jpegs. Other responsive image techniques can be applied as well.

Sharp supports webp, so updating the images.js output should be straightforward too...

tonyisworking commented 5 years ago

Also there's an example for supporting the modern srcset pattern which should solve issue vuestorefront/vue-storefront-1#307