JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8921
  • Score
    100M100P100Q126870F
  • License MIT

A small node.js library for converting any image to webp file format or converting webp image to any image file format.

Package Exports

  • webp-converter
  • webp-converter/cwebp

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (webp-converter) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

webp-converter Logo

webp-converter v2.1.4

A small node.js library for converting any image to webp file format or converting webp image to any image file format.

This module uses cwebp and dwebp precompiled executables of WebP Libraries for more info visit WebP

For converting other image formats to webp please read this documentation cwebp Encoder

For converting webp image to other image format please read this documentation dwebp Encoder

For converting gif image to webp please read this documentation gif2webp Converter

How to use

//get module
var webp=require('webp-converter');

//pass input_image(.jpeg,.pnp .....) path ,output_image(give path where to save and image file name with .webp extension)
//pass option(read  documentation for options)
webp.cwebp("nodejs_logo.jpg","nodejs_logo.webp","-q 80",function(status)
  {
      //if conversion successfull status will be '100'
      //if conversion unsuccessfull status will be '101'
      console.log(status);
  });

//pass input_image(.webp image) path ,output_image(.jpeg,.pnp .....)
webp.dwebp("nodejs_logo.webp","nodejs_logo.jpg","-o",function(status)
  {
      //if conversion successfull status will be '100'
      //if conversion unsuccessfull status will be '101'
      console.log(status);
  });

//pass input_image(.gif) path ,output_image(give path where to save and image file name with .webp extension)
//pass option(read  documentation for options)
webp.gwebp("nodejs_logo.gif","nodejs_logo.webp","-q 80",function(status)
  {
      //if conversion successfull status will be '100'
      //if conversion unsuccessfull status will be '101'
      console.log(status);
  });

Installation

$ npm install webp-converter

License

MIT