@yadimon/ng-smart-images
August 2, 2026 ยท View on GitHub
Build fast, cacheable local images without replacing Angular's standard
builder. ng-smart-images generates resized AVIF/WebP/original variants with
content-hashed filenames, rewrites static asset URLs after the build, and gives
application code a typed runtime manifest for dynamic images.
It is a build tool, not an image CDN or an Angular image component. Your source images stay in the repository and the optimized files ship with the app.
Quick Start
npm install @yadimon/ng-smart-images
npx ng-smart-images sync-manifest
npx ng-smart-images generate-hashed
ng build
npx ng-smart-images update-bundle --dist dist/app/browser
The first command discovers images under src/assets. The remaining commands
create immutable image variants, build the app normally, then replace static
assets/... references in generated HTML and CSS with hashed URLs.
For package scripts, responsive srcset examples, cache behavior, Angular DI,
and Docker/CI integration, read the
package guide.
Repository Layout
packages/ng-smart-images: publishable package source, runtime helpers, Angular wrapper, tests, and build scripts.examples/basic-app: Angular 21 fixture app used for integration verification..github/: CI workflow, publish workflow, Dependabot, and contribution templates.
Local Development
npm install
npm run verify
Useful focused commands:
npm run lintnpm run format:checknpm run typechecknpm run testnpm run build:examplenpm run packnpm run publish:dry-runnpm run checknpm run release:patchnpm run release:minornpm run release:major
Publishing
The package workflow is set up for npm trusted publishing with explicit semver bumps and v* tags. The release flow and maintainer steps are documented in RELEASING.md.
Community Files
The repo includes:
AGENTS.mdfor automation and contributor instructions.CONTRIBUTING.mdfor local workflow and contribution expectations.SECURITY.mdfor vulnerability reporting guidance.- GitHub issue forms and a pull request template.
Package-specific usage and integration details live in packages/ng-smart-images/README.md.