mlisook / plastic-image

A Polymer 3.0 element which adds extra plasticity to <iron-image> with support for srcset and lazy loading
MIT License
30 stars 6 forks source link

Better spec-compliant implementation for srcsetParse() #25

Closed paales closed 7 years ago

paales commented 7 years ago

Solves an issue where parsing of the srcset would trip up because of comma's in the URL's it's self.

The current srcset parser is based on: https://github.com/sindresorhus/srcset/blob/master/index.js The new implementation is based on https://github.com/albell/parse-srcset

Example srcset:

https://media.graphcms.com/resize=width:150/pr3owvCTRLW4Vg56KT3L 150w, https://media.graphcms.com/resize=width:300/pr3owvCTRLW4Vg56KT3L 300w, https://media.graphcms.com/resize=width:405/pr3owvCTRLW4Vg56KT3L 405w, https://media.graphcms.com/resize=width:810/pr3owvCTRLW4Vg56KT3L 810w, https://media.graphcms.com/resize=width:1024/pr3owvCTRLW4Vg56KT3L 1024w, https://media.graphcms.com/resize=width:500,height:750/pr3owvCTRLW4Vg56KT3L 500w 750h
mlisook commented 7 years ago

Thank you for your continued contributions to plastic-image.