Polymer / shop

The Shop app
https://shop.polymer-project.org/
986 stars 494 forks source link

Add decoding=async to images as appropriate in Shop #156

Open chrishtr opened 6 years ago

chrishtr commented 6 years ago

There is a new attribute available on tags called "decoding", which specifies a developers preference for synchronous or asynchronous decoding. the default is "auto", which means the user agent may choose its own preference. For good performance it should probably be recommended to use decoding=async on images that are content (images of clothing) as opposed to expected to be strongly connected to the brand of the site or its navigation (logo, UI icons).

Spec:

https://html.spec.whatwg.org/#decoding-images

Safari will support this feature in the next release. Chrome is likely going to support it in version 65.

keanulee commented 6 years ago

Made a branch for this at https://github.com/Polymer/shop/tree/async-img and deployed a test version to https://async-img-dot-polymer-shop.appspot.com/