Skip to main content

latest

Convert an image file to url using ImgBB API

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)

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.

@epi/image-to-url

Convert an image to a URL using the ImgBB API

Example

import ImageToUrl from "@epi/image-to-url";

const image = await Deno.readFile("./image.png");
const file = new File([read], "image.png", { type: "image/png" });
const url = await ImageToUrl(file, API_KEY);

console.log(url); // https://i.ibb.co/WvstcQd/image.png

Get an API Key

Add Package

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

Import symbol

import * as image_to_url from "@epi/image-to-url";

---- OR ----

Import directly with a jsr specifier

import * as image_to_url from "jsr:@epi/image-to-url";

Add Package

npx jsr add @epi/image-to-url

Import symbol

import * as image_to_url from "@epi/image-to-url";

Add Package

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

Import symbol

import * as image_to_url from "@epi/image-to-url";

Add Package

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

Import symbol

import * as image_to_url from "@epi/image-to-url";

Add Package

bunx jsr add @epi/image-to-url

Import symbol

import * as image_to_url from "@epi/image-to-url";