progressive-img-loader
a webpack loader for progressive image load
Last updated 2 years ago by huangteng .
MIT · Original npm · Tarball · package.json
$ cnpm install progressive-img-loader 
SYNC missed versions from official npm registry.

progressive-img-loader

a webpack loader for progressive image loading.

this repo be aimed at how to write a webpack-loader.

useage

{
  test: /\.(png|jpe?g)$/,
  use: [
    {
      loader: 'progressive-img-loader',
      options: {
        base64: true
      }
    },
    {
      loader: 'url-loader',
      options: {
        limit: 8000
      }
    }
  ]
}

// in component
import icon from './assets/icons/test.png'

// if you hava a component called like 'ProgressiveImage' makes image load progressively.
// the icon.src is the image native source, the icon.thumbnail is thumbnail (base64)
// also you can add 'blur(**px)' make it better
<ProgressiveImage src={icon.thumbnail} data-src={icon.src} />

thx

  1. jimp

  2. file-loader

  3. url-loader

  4. lqip-loader

Current Tags

  • 1.0.3                                ...           latest (2 years ago)

4 Versions

  • 1.0.3                                ...           2 years ago
  • 1.0.2                                ...           2 years ago
  • 1.0.1                                ...           2 years ago
  • 1.0.0                                ...           2 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 2
Last Day 0
Last Week 2
Last Month 1
Dependencies (3)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |