Skip to content

state of webp-hero and contribution wishlist #39

@chase-moskal

Description

@chase-moskal

thanks to fixes by the fine folks at google, i've reworked the libwebp build and finally have it working again. this unblocks further development on webp-hero, so i'm now prepared to merge incoming pull requests. i don't have many spare cycles these days to implement new features, but if anybody is looking to contribute, there are some things on my mind:

  • conditional loading of the whole library — the currently recommended strategy in the readme is alarmingly wasteful, because it will load the entire bundle (94 KB), even on new browsers which already support webp. i think we should create some kind of wrapper which avoids loading the whole library when webp is supported

  • complete support for all image types — i'd love for polyfillDocument to work on css background images and picture elements. i know some folks with forks have done work in this area: i would be interested to merge a rebased pull request for this functionality

  • detect webp by mime-type — we should explore whether or not it's possible to detect webp images by their mime-type instead of by their file extension. we need to confirm that this can work for image elements, css images, and picture elements also. this would be a great improvement to webp-hero

  • web workers for browsers that support it — i see that ie11 should support web workers. if we could add this as a progressive enhancement, it might couple nicely with conditional loading of the whole library to greatly improve performance and user experience

i'm still thinking about revisiting breaking refactors sketched out in #19 before releasing a v0.0.0, but these days i don't have the time to consider taking on that project. so for the time being, i'm planning to just keep maintaining -dev versions while avoiding breaking changes, accepting new incoming pull requests

    👋 chase

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions