npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@chriscdn/exif

v3.0.2

Published

Assist in extracting EXIF information from JPG, PNG, and HEIC photos.

Readme

@chriscdn/exif

Motivation

EXIF metadata can be inconsistent, particularly when it comes to timestamps and location data. Many images store dates in local time without specifying a time zone, making it difficult to determine precisely when a photo was taken.

This library, built on exifreader, extracts metadata from photos and aims to normalize:

  • Location – Extracts GPS coordinates and identifies the time zone.
  • Date & Time – Uses the time zone to determine the UTC time of the photo.
  • Dimensions – Retrieves the image width and height.

Attempts are made to normalize the results from exifr, which can vary among image types.

Note: This package has only been tested with HEIC, PNG, and JPG files.

This package addresses a personal use case, but perhaps someone else will find it useful.

Installation

Using npm:

npm install @chriscdn/exif

Using yarn:

yarn add @chriscdn/exif

Usage

import { exif, type ExifData } from "@chriscdn/exif";

// Node.js
const image = "./path/to/file.jpg";
const data: ExifData = await exif(image);

// Browser
const file: File;
const data: ExifData = await exif(file);

The ExifData return value

This is an opinionated return value which addresses my use case. Pull requests are welcome if you require other fields to be added.

Fields are null when the data isn't available.

  • latitude (number|null): Decimal degrees, rounded to 6 significant digits.
  • longitude (number|null): Decimal degrees, rounded to 6 significant digits.
  • timeZone (string|null): Time zone derived from latitude/longitude.
  • localTime (string|null): ISO 8601 local time (e.g., "2023-01-01T09:45:64").
  • timestamp (number|null): Unix timestamp in milliseconds.
  • title (string|null): Image title.
  • caption (string|null): Image description.
  • width (number): Image width in pixels.
  • height (number): Image height in pixels.
  • city (string|null): City where taken.
  • state (string|null): State or region where taken.
  • country (string|null): Country where taken.
  • countryCode (string|null): ISO country code.
  • location (string|null): Location.
  • rating (number|null): Numeric rating.
  • mimetype (string|null): MIME type (e.g., image/jpeg).
  • keywords (string[]): Associated tags; empty array if none.

License

MIT