Skip to main content
Home

latest

Convert an image buffer to a webp

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
a year 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);

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@epi/image-to-webp

Import symbol

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

Import directly with a jsr specifier

import * as image_to_webp from "jsr:@epi/image-to-webp";

Add Package

pnpm i jsr:@epi/image-to-webp
or (using pnpm 10.8 or older)
pnpm dlx jsr add @epi/image-to-webp

Import symbol

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

Add Package

yarn add jsr:@epi/image-to-webp
or (using Yarn 4.8 or older)
yarn dlx jsr add @epi/image-to-webp

Import symbol

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

Add Package

vlt install jsr:@epi/image-to-webp

Import symbol

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

Add Package

npx jsr add @epi/image-to-webp

Import symbol

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

Add Package

bunx jsr add @epi/image-to-webp

Import symbol

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