elringus / imgit

Transform images, video and YouTube links to HTML optimized for web vitals
https://imgit.dev
MIT License
21 stars 1 forks source link
avif cls compress embed encode lazy-load md size vite-plugin

imgit logo


npm codefactor codecov codeql


Convert media links to optimized HTML

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.

Features

✨ 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

🎬 Get Started

http://imgit.dev/guide