Run
Point ImageForge at your source directory to generate WebP/AVIF derivatives and blur placeholders at build time.
imageforge ./public/images -f webp,avifImageForge is a build-time image optimization CLI for Next.js and other static web apps. It generates responsive WebP and AVIF derivatives, blurDataURL placeholders, and a hash-based cache. It writes imageforge.json and enforces freshness in CI with --check for a repeatable image freshness workflow.
npm install --save-dev --save-exact @imageforge/cli@0.1.10npx @imageforge/cli@0.1.10 ./public/images --dry-runPin a project dev dependency for repeatable runs; use the one-off preview command when you are evaluating the CLI.
Illustrative CLI output; summary timings are tied to the linked approved benchmark snapshot.
Per-request billing · first-hit latency · external-service compliance risk
Point ImageForge at your source directory to generate WebP/AVIF derivatives and blur placeholders at build time.
imageforge ./public/images -f webp,avifAdd --check in CI so stale outputs fail the pipeline with a generation command that preserves the effective options; review shell quoting before running it.
imageforge ./public/images -f webp,avif --check
# fails if outputs are staleRead imageforge.json inside your app for dimensions, blurDataURL, and stable output paths.
{
"generated": "2026-05-29T09:30:00.000Z",
"images": {
"hero.jpg": {
"blurDataURL": "data:image/png;base64,iVBOR...",
"outputs": {
"webp": { "path": "hero.webp", "size": 98765 },
"avif": { "path": "hero.avif", "size": 65432 }
}
}
}
}Keep image optimization predictable with build-time outputs, CI checks, and structured metadata your app can consume directly.
Generate stable WebP/AVIF paths before deploy without a runtime image transformation service.
-f webp,avif
Use --check to fail CI when source images changed without regenerated outputs.
--check
Content and options hashing skips unchanged files, keeping local and CI reruns predictable.
--cache
Emit blurDataURL, dimensions, and output paths in imageforge.json for direct next/image usage.
--blur
Set --concurrency to keep large catalogs under control without overloading build workers.
--concurrency
Use --json for structured logs in CI pipelines and internal automation tooling.
--json
Evidence snapshot - 200 source images, P2 / batch-all
See benchmark details in Methodology or browse the full evidence page.
As of July 10, 2026 - owner ImageForge Maintainers (CLI + Growth)
Dataset
200 images
P2 / batch-all
Cold wall
72.49s
input 5.1 MB, generated 1.1 MB
Warm p50
134.8ms
1475.6 img/s
Speedup
534.82x
cold vs warm mean wall
Headline benchmark numbers are sourced from a documented benchmark evidence record and are updated through approval-gated sync PRs.
View the full benchmark report for cold/warm charts, deltas, and run metadata.
200 source images with a combined input size of 5.1 MB. Output target formats are WebP and AVIF under profile P2.
CLI v0.1.9, Node 22, ubuntu-24.04, dataset 1.0.0, scenario batch-all.
imageforge ./public/images --formats webp,avif --quality 80 --blur
Benchmark evidence source: .github/workflows/benchmark-ci.yml. Sync path: automated nightly snapshot PR to imageforge-site with manual reviewer approval.
78% is the size delta from 5.1 MB input to 1.1 MB generated outputs in this evidence snapshot. 72.5s is the associated run duration shown in the example output.
As of July 10, 2026. Owner: ImageForge Maintainers (CLI + Growth). Artifact: benchmark workflow.
Use --check in CI to fail when source, cache, or derivative state needs processing across branches. Published version 0.1.10 validates the manifest together with source, cache, and derivative state.
Failing run
# Illustrative transcript
$ imageforge ./public/images --output imageforge.json --formats webp,avif --quality 80 --blur-size 16 --concurrency 4 --check
[1/3] cached logo.png
[2/3] needs processing hero.jpg
[3/3] needs processing new-banner.png
2 image(s) need processing.
Run: imageforge ./public/images --output imageforge.json --formats webp,avif --quality 80 --blur-size 16 --concurrency 4
Exit code: 1Passing run
# Illustrative transcript
$ imageforge ./public/images --output imageforge.json --formats webp,avif --quality 80 --blur-size 16 --concurrency 4 --check
[1/3] cached logo.png
[2/3] cached hero.jpg
[3/3] cached new-banner.png
All images up to date.
Exit code: 0Copy the complete workflow and generated-state policy from the CI integration guide.
Import imageforge.json and point src to a generated derivative, and use its dimensions and blur data. The example bypasses a second Next.js runtime transformation. The manifest is framework-neutral JSON, but other framework adapters should be verified against their own image and asset conventions.
// lib/imageforge.ts
import manifest from "../imageforge.json";
import type { ImageForgeEntry } from "@imageforge/cli";
const images = manifest.images as Record<string, ImageForgeEntry>;
export function getImageMeta(src: string): ImageForgeEntry {
const image = images[src];
if (!image) throw new Error(`ImageForge manifest entry not found: ${src}`);
return image;
}
// app/page.tsx
import Image from "next/image";
import { getImageMeta } from "@/lib/imageforge";
const hero = getImageMeta("hero.jpg");
const heroSrc = `/images/${hero.outputs.webp.path}`;
<Image
src={heroSrc}
alt="Product hero banner"
width={hero.width}
height={hero.height}
placeholder="blur"
blurDataURL={hero.blurDataURL}
unoptimized
/>;Need multiple candidates? The responsive picture guide builds AVIF and WebP srcsets from manifest variants with a layout-aware sizes attribute. For a framework-free path, follow the native HTML guide.
Next.js-first workflows are front and center, with the same manifest pattern usable in other frameworks and static pipelines.
Profile: small product teams and agencies that need predictable hosting costs.
Pain: per-request optimization pricing grows faster than traffic budgets.
ImageForge fit: pre-generate optimized assets without a runtime transformation service or ImageForge usage fee.
npx @imageforge/cli@0.1.10 ./public/images -f webp,avif
Profile: engineering orgs that already enforce lint, typecheck, and formatting in pipeline gates.
Pain: unoptimized assets slip into deploys because image checks are manual.
ImageForge fit: add --check so stale images fail fast with an effective-option remediation command.
imageforge ./public/images --check
Profile: security-sensitive environments with strict data residency and egress controls.
Pain: external image APIs can violate compliance boundaries or security policy.
ImageForge fit: all processing is local in the build environment, with no third-party upload path.
imageforge ./secure-assets -f webp,avif --concurrency 4
Profile: teams moving to VPS, Kubernetes, or self-managed hosting for cost and control.
Pain: runtime image optimization becomes migration friction and infrastructure overhead.
ImageForge fit: generate static derivatives at build time and serve from any CDN or static host.
imageforge ./public/images --out-dir ./public/optimized
ImageForge is optimized for reviewable build-time pipelines. These tradeoffs keep costs predictable and operations simple.
In responsive width-set mode, requested widths are treated as targets. Effective generated widths can clamp to source dimensions and do not upscale.
Mitigation: Set width targets intentionally, inspect generated outputs, and keep width-set counts within the documented cap for your CLI version.
ImageForge generates a fixed derivative set at build time. It does not resize images on-the-fly per request.
Mitigation: Generate the sizes you need ahead of time or pair outputs with a CDN strategy.
ImageForge writes static assets and metadata, but it does not include global delivery infrastructure.
Mitigation: Deploy outputs behind Cloudflare, CloudFront, Fastly, or your existing CDN layer.
Large first-time catalogs can take minutes to process because work scales with source file count.
Mitigation: Hash caching keeps subsequent runs fast by processing only changed files.
Check the constraints against your workload in the when-to-use decision guide.
ImageForge is a build-time pipeline, not a replacement for every managed media platform. Start with how your images arrive and who should own transformation and delivery.
Use ImageForge for repository-backed assets, fixed responsive candidates, reviewable generated files, and CI freshness enforcement.
Keep a managed image service for dynamic uploads, arbitrary transformations, media management, signed URLs, or an integrated delivery control plane.
Include build compute, storage, delivery, cache behavior, transfer, and operational ownership—not only transformation pricing.
Preview with --dry-run, add --check in CI, and avoid a runtime transformation service. Build, storage, CDN, and egress costs still depend on your hosting setup.
npm install --save-dev --save-exact @imageforge/cli@0.1.10npx @imageforge/cli@0.1.10 ./public/images --dry-run