Skip to content

jbkirby/css-img-datauri-stream

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSS Local Image Reference -> Data URI Transform

Accepts a file argument and an (optional) opts argument. For a CSS file passed as input, returns a through stream with references to local images replaced by inline data URIs. All other files return a vanilla through stream.

The opts argument object may contain the following:

  • maxImageSize : size (in bytes) beyond which local images references will not be converted to data URIs.

Can be used as a parcelify transform.

Draws heavily from Grunt Image Embed by Eric Hynds.

#Usage

css-img-datauri-stream(file [, opts])

  • file - the CSS file to transform
  • opts - optional object whose 'maxImageSize' member specifies a byte size beyond which local image references will not be converted to data URIs.

About

css-img-datauri-stream

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •