Transform images, video and YouTube links to HTML optimized for web vitals
MIT License
Images, video and YouTube: fetch, encode, scale, lazyload for best UX and Web Vitals imgit is a JavaScript package and set of plugins for popular web frameworks to enhance user experience when interacting with media-heavy websites, such as blogs, landings, portfolios and documentation sites.
Builds optimized HTML for media URLs, markdown or JSX tags
Encodes to AV1/AVIF utilizing GPU acceleration
Supports JPG, A/PNG, GIF, WEBM/P, AVI, MKV, TIFF, PSD and more
Generates tiny blurred covers cross-faded into HD source on lazy-load
Scales the content while preserving HD original for high-DPI displays
Fetches sources from remote URLs, uploads optimized versions to CDN
Plugs into Astro, Svelte, VitePress and more; runs on Node, Deno and Bun