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

@seatgeek/next-fastly-image

v0.1.1

Published

Stateless, zero-dependency Fastly Image Optimizer loader for next/image — typed, host-agnostic, and tested.

Readme

next-fastly-image

CI npm version minzipped size install size zero dependencies license

A stateless, zero-dependency loader that lets next/image delegate image transformation to Fastly Image Optimizer ("Fastly IO"). Instead of your Next.js server resizing every image, Fastly transforms and caches each srcset variant at the CDN edge - driven purely by query parameters.

It's the Fastly snippet from the Next.js docs, productionized: typed against the full Fastly IO API, host-agnostic, preset-driven, and tested at 100% coverage.

[!IMPORTANT] Fastly Image Optimizer must be enabled on your Fastly service (paid add-on + VCL/Compute routing - see Fastly's setup guide). Without it, the params are silently ignored and untransformed originals are served - degraded, not broken.

Install

npm install @seatgeek/next-fastly-image   # or pnpm add / yarn add / bun add

Node ≥ 20 for local development. Works with Next.js ≥ 13, both routers (compatibility details).

Quick start

If all your images go through Fastly, wire it once globally. Create a loader file:

// image-loader.js
"use client";

import { createFastlyLoader } from "@seatgeek/next-fastly-image/next";

export default createFastlyLoader("default");

Reference it in next.config.js:

module.exports = {
  images: { loader: "custom", loaderFile: "./image-loader.js" },
};

Every <Image> now renders a Fastly-parameterized srcset:

/img/hero.jpg?auto=webp&quality=75&width=640 640w, …?width=1080 1080w, …

[!WARNING] A global loader is all-or-nothing: it opts every image out of the built-in optimizer, and /_next/image stops existing entirely. If only some images go through Fastly, use the FastlyImage component instead of a global loader.

Only some images on Fastly?

Skip the global config and use the wrapper component where Fastly applies - plain <Image> keeps the built-in optimizer:

import Image from "next/image";
import { FastlyImage } from "@seatgeek/next-fastly-image/component";

<FastlyImage src="/img/hero.jpg" width={1200} height={630} alt="Hero" />   // Fastly IO
<Image src="/other/logo.png" width={200} height={50} alt="Logo" />         // built-in optimizer

See recipes for the full decision matrix, per-component loaders, multi-CDN routing, and dedicated image hosts.

Beyond Next.js

The core is framework-agnostic - a pure function you can use anywhere:

import { fastlyImageUrl } from "@seatgeek/next-fastly-image";

fastlyImageUrl("/img/a.png?t=123", { width: 640, auto: "webp" });
// => "/img/a.png?t=123&width=640&auto=webp"

Documentation

| Doc | Contents | | --- | --- | | API reference | All exports, the full 29-option Fastly IO table, presets, restricted mode | | Recipes | Multiple loaders, FastlyImage, multi-CDN routing, dedicated image hosts | | Next.js compatibility | Version support, App Router notes, Next 16 qualities, remotePatterns | | Contributing | Setup, quality gates, smoke test | | Releasing | One-time setup, changesets flow, release guards, tagging |

Package invariants (host-agnostic, 1:1 param naming, pure functions, zero deps) live in AGENTS.md and are enforced by tests and CI.

Disclaimer

This project is not affiliated with, endorsed by, or sponsored by Fastly, Inc. "Fastly" and "Fastly Image Optimizer" are trademarks of Fastly, Inc. SeatGeek does not operate or control the Fastly IO service; its behavior, availability, and pricing are governed solely by Fastly.

License

Apache-2.0 © SeatGeek