Skip to main content
This package works with Node.js, Deno, BunIt is unknown whether this package works with Cloudflare Workers
It is unknown whether this package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
82%
Published
5 months ago (3.0.0)

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

What's New

  • TypeScript!
  • Clean code, use system binaries instead of shipped

How to use

import { cwebp, gwebp } from "towebp";

await cwebp("input.jpg", "output.webp", "-q 80")

// for gifs

await gwebp("input.gif", "output.webp", "-q 80")

Add Package

deno add jsr:@tobycm/towebp

Import symbol

import * as towebp from "@tobycm/towebp";

---- OR ----

Import directly with a jsr specifier

import * as towebp from "jsr:@tobycm/towebp";

Add Package

npx jsr add @tobycm/towebp

Import symbol

import * as towebp from "@tobycm/towebp";

Add Package

yarn dlx jsr add @tobycm/towebp

Import symbol

import * as towebp from "@tobycm/towebp";

Add Package

pnpm dlx jsr add @tobycm/towebp

Import symbol

import * as towebp from "@tobycm/towebp";

Add Package

bunx jsr add @tobycm/towebp

Import symbol

import * as towebp from "@tobycm/towebp";