Skip to main content

Built and signed on GitHub Actions

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
2 weeks ago (1.0.0)

image-size

Get image format and image size from bytes.

Usage

import { getImageInfo } from "jsr:@retraigo/image-size";

const image = Deno.readFileSync("test.png");

console.log(getImageInfo(image));
/**
 * {
 *      format: "png",
 *      width: 1280,
 *      height: 720,
 * }
 */
Built and signed on
GitHub Actions
View transparency log

Add Package

deno add jsr:@retraigo/image-size

Import symbol

import * as mod from "@retraigo/image-size";

---- OR ----

Import directly with a jsr specifier

import * as mod from "jsr:@retraigo/image-size";

Add Package

npx jsr add @retraigo/image-size

Import symbol

import * as mod from "@retraigo/image-size";

Add Package

yarn dlx jsr add @retraigo/image-size

Import symbol

import * as mod from "@retraigo/image-size";

Add Package

pnpm dlx jsr add @retraigo/image-size

Import symbol

import * as mod from "@retraigo/image-size";

Add Package

bunx jsr add @retraigo/image-size

Import symbol

import * as mod from "@retraigo/image-size";