This repository was archived by the owner on May 1, 2025. It is now read-only.
Description Any chance of quickly adding webp support? ImageMagick seems to allow webp (See here) .
I tried the README example using webp:
var resize = require ( 'im-resize' ) ;
var image = {
path : 'cute-cat.jpg' ,
width : 5184 ,
height : 2623
} ;
var output = {
versions : [ {
suffix : '-square' ,
maxWidth : 200 ,
aspect : "1:1" ,
format :"webp"
} ]
} ;
resize ( image , output , function ( error , versions ) {
if ( error ) { console . error ( error ) ; }
console . log ( versions [ 0 ] . path ) ; // /path/to/image-thumb.jpg
console . log ( versions [ 0 ] . width ) ; // 150
console . log ( versions [ 0 ] . height ) ; // 100
console . log ( versions [ 1 ] . path ) ; // /path/to/image-square.jpg
console . log ( versions [ 1 ] . width ) ; // 200
console . log ( versions [ 1 ] . height ) ; // 200
} ) ;
But got the following error:
Error: Command failed : convert cute - cat . jpg - auto - orient - strip - write mpr :cute - cat . jpg + delete mpr :cute - cat . jpg - quality 80 - crop "2624x2623+1280+0" - resize "200" cute - cat - square . webp Reactions are currently unavailable
Any chance of quickly adding webp support? ImageMagick seems to allow webp (See here).
I tried the README example using webp:
But got the following error: