img-fast
TypeScript icon, indicating that this package has built-in type declarations

0.1.6 • Public • Published

img-fast

Work in progress

img-fast is a framwork-agnostic typescript ES6 web component meant to load images nicer (and faster). The goals are:

  • Quickly get info (dimensions, thumbnail, etc.) by range requesting the first few kilobytes of all images on page.
  • Make SVG-placeholder with correct proportions
  • Prioritize full size downloads with intersection-observer (lazy load)
  • Where possible load the EXIF-thumbnail of jpeg's as placeholder
  • Support multiple server side resolutions (to rerender higher quality stepwise)
  • Public hooks (observables) to react to stages of image loads (e.g. start some other AJAX-request after lo-res has loaded)

So far the only dependencies are ts-exif-parser and rxjs

Example page

(work in progress) https://wiegell.github.io/img-fast/

Readme

Keywords

none

Package Sidebar

Install

npm i img-fast

Weekly Downloads

8

Version

0.1.6

License

ISC

Unpacked Size

6.84 MB

Total Files

82

Last publish

Collaborators

  • wiegell