Skip to main content

latest

Convert an image buffer to a webp

This package works with Bun, Cloudflare Workers, Node.js, Deno, Browsers
JSR Score
100%
Published
3 months ago (1.0.0)

@epi/image-to-webp

Convert an image buffer to a webp buffer

Example

import ImageToWebp from "@epi/image-to-webp";

const png = await Deno.readFile("./image.png");
const webp = await ImageToUrl(buffer, 'png');

await Deno.writeFile("./image.webp", webp);

Add Package

deno add @epi/image-to-webp

Import symbol

import * as mod from "@epi/image-to-webp";

Add Package

npx jsr add @epi/image-to-webp

Import symbol

import * as mod from "@epi/image-to-webp";

Add Package

yarn dlx jsr add @epi/image-to-webp

Import symbol

import * as mod from "@epi/image-to-webp";

Add Package

pnpm dlx jsr add @epi/image-to-webp

Import symbol

import * as mod from "@epi/image-to-webp";

Add Package

bunx jsr add @epi/image-to-webp

Import symbol

import * as mod from "@epi/image-to-webp";