vuestorefront / storefront-ui

A frontend library for React and Vue that helps developers quickly build fast, accessible, and beautiful storefronts. Made with 💚 by Vue Storefront team and contributors.
https://storefrontui.io
MIT License
2.35k stars 456 forks source link

SfImage improvements #292

Closed filrak closed 5 years ago

filrak commented 5 years ago

We need a few improvements on SfImage

  1. Make image load lazily (add prop lazy defaulting to true)
  2. Add placeholder (prop placeholder)
leomp12 commented 5 years ago

Browser native lazy load stills on very early stages (only Chrome supports), lozad is already being used on SfGallery so I think we should also use it on SfImage.

Additionally, would be good to optionally render a <picture> (with lozad), I would suggest to receive a src string on prop or a picture object with multiple sizes, wdyt?

leomp12 commented 5 years ago

We have talked about on dicord...

leomp12 commented 5 years ago

@talissonf @matheusgnreis

filrak commented 5 years ago

@leomp12, 100% agree on both points ;)