Skip to main content

latest

Convert an image file to url using ImgBB API

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

@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 @epi/image-to-url

Import symbol

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

Add Package

npx jsr add @epi/image-to-url

Import symbol

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

Add Package

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

Import symbol

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

Add Package

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

Import symbol

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

Add Package

bunx jsr add @epi/image-to-url

Import symbol

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