17 lines
421 B
Markdown
17 lines
421 B
Markdown
# @wrnexus/image
|
|
|
|
Responsive image attribute generation with secure remote-host policies and audits for dimensions, LCP loading, source oversizing, transfer size, and modern formats.
|
|
|
|
```ts
|
|
import { createResponsiveImage } from "@wrnexus/image";
|
|
const attrs = createResponsiveImage({
|
|
src: "/hero.jpg",
|
|
alt: "Hero",
|
|
width: 1600,
|
|
height: 900,
|
|
widths: [480, 960, 1600],
|
|
sizes: "100vw",
|
|
format: "avif",
|
|
});
|
|
```
|