# Image pipeline

Feature 3 of 14, in the group "First-paint levers". Labels across 23 meta-frameworks: 9 1st-party, 0 Experimental, 14 Third-party, 0 Manual.

## What it is and why it matters

An image pipeline resizes and re-encodes images per device, emits `srcset`/`sizes`, and often adds lazy loading and a blur placeholder. In principle this item affects LCP more than FCP.

## Gotchas

- Unpic only builds URLs; something (IPX, a host CDN) still has to serve the resized image.

## Labels

| Framework | Label | Points |
| --- | --- | --- |
| [Next](https://framework-compare.vercel.app/frameworks/next.md) | 1st-party | 2 |
| [Nuxt](https://framework-compare.vercel.app/frameworks/nuxt.md) | 1st-party | 2 |
| [SvelteKit](https://framework-compare.vercel.app/frameworks/sveltekit.md) | 1st-party | 2 |
| [SolidStart](https://framework-compare.vercel.app/frameworks/solidstart.md) | 1st-party | 2 |
| [TanStack Start (React)](https://framework-compare.vercel.app/frameworks/tanstack-start-react.md) | Third-party | 1 |
| [TanStack Start (Solid)](https://framework-compare.vercel.app/frameworks/tanstack-start-solid.md) | Third-party | 1 |
| [Pracht](https://framework-compare.vercel.app/frameworks/pracht.md) | 1st-party | 2 |
| [Waku](https://framework-compare.vercel.app/frameworks/waku.md) | Third-party | 1 |
| [Ember](https://framework-compare.vercel.app/frameworks/ember.md) | Third-party | 1 |
| [Astro](https://framework-compare.vercel.app/frameworks/astro.md) | 1st-party | 2 |
| [React Router](https://framework-compare.vercel.app/frameworks/react-router.md) | Third-party | 1 |
| [Qwik City](https://framework-compare.vercel.app/frameworks/qwik-city.md) | 1st-party | 2 |
| [Angular (SSR)](https://framework-compare.vercel.app/frameworks/angular.md) | 1st-party | 2 |
| [Marko](https://framework-compare.vercel.app/frameworks/marko.md) | Third-party | 1 |
| [Fresh](https://framework-compare.vercel.app/frameworks/fresh.md) | Third-party | 1 |
| [Analog](https://framework-compare.vercel.app/frameworks/analog.md) | 1st-party | 2 |
| [Vike](https://framework-compare.vercel.app/frameworks/vike.md) | Third-party | 1 |
| [RedwoodSDK](https://framework-compare.vercel.app/frameworks/redwoodsdk.md) | Third-party | 1 |
| [Remix 3](https://framework-compare.vercel.app/frameworks/remix.md) | Third-party | 1 |
| [Void (React)](https://framework-compare.vercel.app/frameworks/void-react.md) | Third-party | 1 |
| [Void (Vue)](https://framework-compare.vercel.app/frameworks/void-vue.md) | Third-party | 1 |
| [Void (Svelte)](https://framework-compare.vercel.app/frameworks/void-svelte.md) | Third-party | 1 |
| [Void (Solid)](https://framework-compare.vercel.app/frameworks/void-solid.md) | Third-party | 1 |

## How to enable it in each framework

### Next

Label: **1st-party** (2 of 2 points).

Use [`next/image`](https://nextjs.org/docs/app/api-reference/components/image) plus the built-in optimizer, `priority` on the first ten covers (deprecated in v16 in favour of `preload`), `sizes`, and `placeholder="blur"` fed by ThumbHash data URIs generated by this port's own code.

```tsx
<Image
  alt={title}
  blurDataURL={thumbhash ? createPngDataUri(thumbhash) : undefined}
  fill
  placeholder={thumbhash ? 'blur' : 'empty'}
  priority={priority}
  sizes={sizes}
  src={resolved}
/>
```

*From this repo's `next-books/features/book/components/book-cover.tsx` (some props omitted).*

Art direction with `<picture>` (Manual, not scored):

[`getImageProps()`](https://nextjs.org/docs/app/api-reference/components/image#art-direction) returns per-breakpoint props; you hand-write the `<picture>` and `<source>` elements (hence 🔧). `getImageProps()` is stable (v14.1.0) and the built-in optimizer already negotiates AVIF/WebP from the `Accept` header; this row scores only whether the framework emits a `<picture>` for you.

```jsx
const {
  props: { srcSet: desktop },
} = getImageProps({ ...common, width: 1440, height: 875, quality: 80, src: '/desktop.jpg' })
const {
  props: { srcSet: mobile, ...rest },
} = getImageProps({ ...common, width: 750, height: 1334, quality: 70, src: '/mobile.jpg' })

return (
  <picture>
    <source media="(min-width: 1000px)" srcSet={desktop} />
    <source media="(min-width: 500px)" srcSet={mobile} />
    <img {...rest} style={{ width: '100%', height: 'auto' }} />
  </picture>
)
```

*Adapted from [the image docs](https://nextjs.org/docs/app/api-reference/components/image#art-direction), where `common` is `{ alt: 'Art Direction Example', sizes: '100vw' }`.*

### Nuxt

Label: **1st-party** (2 of 2 points).

Install [`@nuxt/image`](https://nuxt.com/modules/image) (separate official module) and use [`<NuxtImg preload>`](https://nuxt.com/modules/image/usage/nuxt-img) on the first covers.

```ts
modules: ['@nuxt/image'],
image: {
  provider: isCloudflare ? 'none' : 'auto',
  quality: 82,
},
```

```vue
<NuxtImg :src="source" :sizes="sizes" :preload="priority" :width="400" :height="600" />
```

*From this repo's `nuxt-books/nuxt.config.ts` (`nuxt-books-optimized-max` branch) and `app/components/BookCover.vue` (`optimized` branch; some props and options omitted).*

Art direction with `<picture>` (1st-party, not scored):

[`<NuxtPicture>`](https://nuxt.com/modules/image/usage/nuxt-picture) serves modern formats with a fallback via `@nuxt/image`; its docs say it does not support multiple image sources, so no breakpoint art direction.

```vue
<NuxtPicture
  format="avif,webp"
  src="/nuxt-icon.png"
/>
```

*From [the NuxtPicture docs](https://nuxt.com/modules/image/usage/nuxt-picture).*

Gotchas:

- IPX does not run on Cloudflare Workers, so this port switches image optimization off there.

### SvelteKit

Label: **1st-party** (2 of 2 points).

The framework offers [`@sveltejs/enhanced-img`](https://svelte.dev/docs/kit/images), a build-time plugin that only optimizes image files present at build. For remote images such as this port's covers the same page points to a CDN and names the community `@unpic/svelte`, so this port uses Unpic transforms plus an `ipx` handler (`src/lib/server/ipx-handler.ts`), disabled on Cloudflare. [`adapter-vercel`](https://svelte.dev/docs/kit/adapter-vercel) also has an `images` option (not used here). To use the first-party route for local files:

```ts
enhancedImages(), // must come before the SvelteKit plugin
```

```svelte
<enhanced:img src="./path/to/your/image.jpg" alt="An alt text" />
```

*Adapted from [the images docs](https://svelte.dev/docs/kit/images).*

Art direction with `<picture>` (1st-party, not scored):

[`enhanced:img`](https://svelte.dev/docs/kit/images) (local files only) is replaced at build time by an `<img>` wrapped in a `<picture>` with multiple formats and sizes; that is modern formats, not breakpoint art direction. Setup is the plugin line shown in [section 3](https://framework-compare.vercel.app/features/image-pipeline):

```svelte
<enhanced:img src="./path/to/your/image.jpg" alt="An alt text" />
```

*From [the images docs](https://svelte.dev/docs/kit/images).*

Gotchas:

- Sharp does not run on Cloudflare Workers, so this port switches image optimization off there.
- `@sveltejs/enhanced-img` only processes local images at build time; remote covers need a runtime optimizer.

### SolidStart

Label: **1st-party** (2 of 2 points).

The Solid team publishes [`@solidjs/image`](https://github.com/solidjs/solid-image) (npm `latest` 1.0.0 for Solid 2; 0.x for Solid 1): a `SolidImage` component plus `imagePlugin` from `@solidjs/image/vite`, which resizes and re-encodes local images at build time with sharp, emits `srcset`, lazy-loads, and supports blur/BlurHash/ThumbHash previews. It is not mentioned on docs.solidjs.com (package README only). This port does not use it, or Unpic; it uses a custom `imageSrcset` helper plus the per-host Nitro image config and cover preload components. The Vercel half of that Nitro config looks like this:

```ts
nitro({
  vercel: {
    config: {
      version: 3,
      images: {
        sizes: IMAGE_WIDTHS,
        formats: ["image/avif", "image/webp"],
      },
    },
  },
}),
```

*From this repo's `solid-books/vite.config.ts` (`optimized` branch; `domains`, `remotePatterns`, `minimumCacheTTL` and the Netlify block omitted).*

Art direction with `<picture>` (1st-party, not scored):

`SolidImage` from the Solid team's [`@solidjs/image`](https://github.com/solidjs/solid-image) renders a `<picture>` with one `<source>` per output format (default `webp` + `jpeg`, AVIF available) and a merged `srcset`; that is modern formats and sizes, not breakpoint art direction. The package is documented in its README only, not on docs.solidjs.com. This port does not use it and builds `srcset` with its own `imageSrcset` helper.

`@solidjs/image` covers formats but not breakpoints, so write the `<picture>` in the port's cover component. Wide screens get Goodreads' large cover, and narrow screens keep the medium one.

```tsx
// src/features/book/components/book-cover.tsx
import { getLargeBookImageUrl } from "@/features/book/book-constants";
import { imageSrcset } from "@/lib/image-cdn";
// …
{(src) => (
  <picture>
    <source
      media="(min-width: 768px)"
      srcset={imageSrcset(getLargeBookImageUrl(src())) ?? getLargeBookImageUrl(src())}
      sizes={props.sizes}
    />
    <img
      alt={props.title}
      class="absolute inset-0 h-full w-full object-cover"
      decoding="async"
      width={COVER_WIDTH}
      height={COVER_HEIGHT}
      sizes={props.sizes}
      srcset={imageSrcset(src())}
      src={src()}
    />
  </picture>
)}
```

### TanStack Start (React)

Label: **Third-party** (1 of 2 points).

Use [Unpic](https://unpic.pics) (`@unpic/react`) URL transforms plus IPX/Nitro or the host CDN, chosen in `vite.config.ts`. No first-party image pipeline is documented ([production checklist](https://tanstack.com/start/latest/docs/framework/react/guide/production-checklist) only says to check large images and dimensions).

```tsx
import { Image as UnpicImage } from '@unpic/react'
// ...
<UnpicImage {...props} cdn={imageCdn} options={options} />
```

*From this repo's `tanstack-books/src/components/ui/image.tsx` (`optimized` branch; options handling simplified).*

Art direction with `<picture>` (Manual, not scored):

Nothing to enable: no first-party `<picture>` component is documented ([production checklist](https://tanstack.com/start/latest/docs/framework/react/guide/production-checklist)). Third-party `@unpic/react` exports a [`<Source>`](https://unpic.pics/img/react/) component (`media`, `type`) for use inside a hand-written `<picture>`; this port does not use it, and because the `<picture>` is still hand-written the cell stays 🔧, as for Next's `getImageProps()`.

Wrap the port's Unpic `<Image>` in a hand-written `<picture>`, and add `<Source>` from `@unpic/react` for each art-directed variant. Pass `<Source>` the same CDN settings the port's `Image` wrapper uses.

```tsx
// src/features/book/components/book-cover.tsx
import { Source } from '@unpic/react'
import { Image } from '@/components/ui/image'
import { imageCdn } from '@/lib/image-config'
// …
const small = src ?? EMPTY_IMAGE_URL
const size = { layout: 'constrained', width: COVER_IMAGE_WIDTH, height: COVER_IMAGE_HEIGHT } as const

return (
  <picture>
    <Source
      {...size}
      media="(min-width: 768px)"
      src={getLargeBookImageUrl(small)}
      cdn={imageCdn}
      options={imageCdn === 'ipx' ? { ipx: { baseURL: '/_ipx' } } : undefined}
    />
    <Image {...size} alt={title} src={small} sizes={sizes} priority={priority}
           className="absolute inset-0 size-full object-cover" objectFit="cover" unstyled />
  </picture>
)
```

### TanStack Start (Solid)

Label: **Third-party** (1 of 2 points).

[Unpic](https://unpic.pics) (`@unpic/solid`) with the same IPX/Nitro or host-CDN setup; no first-party image pipeline is documented (same [checklist](https://tanstack.com/start/latest/docs/framework/react/guide/production-checklist)).

```tsx
import { Image as UnpicImage } from "@unpic/solid";
```

*From this repo's `tanstack-solid-books/src/components/ui/image.tsx` (`optimized` branch).*

Art direction with `<picture>` (Manual, not scored):

Same as React ([checklist](https://tanstack.com/start/latest/docs/framework/react/guide/production-checklist)), with `@unpic/solid`.

Write the same `<picture>` as the React port, with `Source` from `@unpic/solid` around the port's `<Image>` wrapper. Solid uses `class` instead of `className`.

```tsx
// src/features/book/components/book-cover.tsx
import { Source } from "@unpic/solid";
import { Image } from "@/components/ui/image";
import { imageCdn } from "@/lib/image-config";
// …
const small = () => props.src ?? EMPTY_IMAGE_URL;
const size = { layout: "constrained", width: COVER_IMAGE_WIDTH, height: COVER_IMAGE_HEIGHT } as const;

return (
  <picture>
    <Source
      {...size}
      media="(min-width: 768px)"
      src={getLargeBookImageUrl(small())}
      cdn={imageCdn}
      options={imageCdn === "ipx" ? { ipx: { baseURL: "/_ipx" } } : undefined}
    />
    <Image {...size} alt={props.title} src={small()} sizes={props.sizes} priority={props.priority}
           class="absolute inset-0 size-full object-cover" objectFit="cover" unstyled />
  </picture>
);
```

### Pracht

Label: **1st-party** (2 of 2 points).

[`@pracht/image`](https://pracht.resynapse.dev/docs/images) ships loaders inside the package (`vercelLoader`, `netlifyLoader`, `cloudflareLoader`, `defaultLoader`, `passthroughLoader`; `createImageHandler` from `@pracht/image/node`), plus `placeholder="blur"`, `priority`, and build-time `?pracht` imports. `netlifyLoader` was added in `@pracht/image` 0.5.0; this port uses it on Netlify (`@pracht/image` 0.6.1).

```ts
plugins: [prachtImage(), pracht({ adapter, inlineCss: true })],
```

```tsx
import { Image } from '@pracht/image';
// ...
<Image
  alt={title}
  blurDataURL={placeholder}
  fill
  placeholder={placeholder ? 'blur' : 'empty'}
  priority={priority}
  sizes={sizes}
  src={resolved}
/>
```

*From this repo's `pracht-books/vite.config.ts` and `src/features/book/components/book-cover.tsx` (`optimized` branch; some props omitted).*

Art direction with `<picture>` (Manual, not scored):

[`@pracht/image`](https://pracht.resynapse.dev/docs/images) emits `srcset`/`sizes`; `getImageProps()` likewise returns plain `img` attributes, with no `<picture>` component. Hand-write the `<picture>` from those attributes, as in the Next snippet above. No Pracht-specific code example was found in the docs.

Call `getImageProps()` from `@pracht/image` once per art-directed source, then write the `<picture>` yourself. The loader configured in the port's `src/lib/images.ts` still builds every `srcset` URL.

```tsx
// src/features/book/components/book-cover.tsx
import { getImageProps } from '@pracht/image';
import { EMPTY_IMAGE_URL, getLargeBookImageUrl } from '@/features/book/book-constants';
import '@/lib/images';
// …
const small = src ?? EMPTY_IMAGE_URL;
const common = { alt: title, fill: true, priority, sizes };
const { srcset: desktop } = getImageProps({ ...common, src: getLargeBookImageUrl(small) });
const mobile = getImageProps({ ...common, src: small });

return (
  <picture>
    <source media="(min-width: 768px)" srcset={desktop} sizes={sizes} />
    <img {...mobile} className="size-full object-cover" onError={() => setFailedSrc(small)} />
  </picture>
);
```

### Waku

Label: **Third-party** (1 of 2 points).

No first-party pipeline is documented: the [migration guide](https://waku.gg/guides/migrating-from-nextjs) says use `<img>` or an image CDN, with no built-in resizing or format negotiation ([static assets](https://waku.gg/#static-assets)). This port rewrites Goodreads' `m` size token to `l` but emits no `srcset`.

Example of building it yourself:

There is no image component, so the port renders a plain `<img>` and rewrites the Goodreads URL itself. The regex swaps the medium-size token `m` for the large `l`. There is no resizing, `srcset` or format negotiation.

```tsx
// src/features/book/book-constants.ts
export function getLargeBookImageUrl(url: string): string {
  return url.replace(/^(https:\/\/images\.gr-assets\.com\/books\/\d+)m(\/\d+\.jpg)$/, '$1l$2');
}

// src/features/book/components/book-cover.tsx
const resolved = getLargeBookImageUrl(src ?? EMPTY_IMAGE_URL);
// …
<img
  alt={title}
  decoding="async"
  fetchPriority={priority ? 'high' : 'auto'}
  sizes={sizes}
  src={resolved}
/>
```

Source: [Waku: Static assets](https://waku.gg/#static-assets)

Art direction with `<picture>` (Manual, not scored):

No first-party support is documented ([migration guide](https://waku.gg/guides/migrating-from-nextjs)); use a plain `<img>`; any `<picture>` would be hand-written.

There is no image component, so write the `<picture>` in the port's cover component. Wide screens get Goodreads' large cover, and narrow screens keep the medium one. React spells the attribute `srcSet`.

```tsx
// src/features/book/components/book-cover.tsx
'use client';
// …
const small = src ?? EMPTY_IMAGE_URL;
const large = getLargeBookImageUrl(small);

return (
  <picture>
    <source media="(min-width: 768px)" srcSet={large} />
    <img
      alt={title}
      className="absolute inset-0 size-full object-cover"
      decoding="async"
      fetchPriority={priority ? 'high' : 'auto'}
      onError={() => setFailedSrc(small)}
      src={small}
    />
  </picture>
);
```

### Ember

Label: **Third-party** (1 of 2 points).

No first-party image support is documented (the [Vite guide](https://guides.emberjs.com/release/build-tools/vite) covers build setup only). The community [`@responsive-image/ember`](https://responsive-image.dev/frameworks/ember) addon with `@responsive-image/vite-plugin` covers build-time resizing, `srcset`, and AVIF/WebP for Embroider + Vite apps; this port does not use it and renders a plain `<img>` with no `srcset` or `sizes`.

Example of building it yourself:

Add the `@responsive-image/vite-plugin` to the Embroider Vite config. An import ending in `?responsive` is resized at build time, and the `<ResponsiveImage>` component from `@responsive-image/ember` renders the `srcset`.

```js
// vite.config.mjs
import { defineConfig } from 'vite';
import { extensions, ember } from '@embroider/vite';
import { babel } from '@rollup/plugin-babel';
import { responsiveImage } from '@responsive-image/vite-plugin';

export default defineConfig({
  plugins: [ember(), babel({ babelHelpers: 'runtime', extensions }), responsiveImage()],
});
```

```gjs
// app/components/home/hero.gjs
import { ResponsiveImage } from '@responsive-image/ember';
import heroImage from './hero.jpg?w=640;1280;1920&responsive';

<template>
  <ResponsiveImage @src={{heroImage}} @size={{100}} alt="Shelves of books" />
</template>
```

Source: [responsive-image: Image component](https://responsive-image.dev/usage/component)

Art direction with `<picture>` (Manual, not scored):

The [Vite guide](https://guides.emberjs.com/release/build-tools/vite) covers build setup only; no first-party support is documented; use a plain `<img>`.

Replace the `<img>` in the port's cover component with a hand-written `<picture>`. Wide screens get Goodreads' large cover, and narrow screens keep the medium one.

```gjs
// app/components/book/book-cover.gjs
import { EMPTY_IMAGE_URL, getLargeBookImageUrl } from '../../lib/book/book-constants';
// …
  get small() {
    return this.args.src ?? EMPTY_IMAGE_URL;
  }

  get large() {
    return getLargeBookImageUrl(this.small);
  }

  <template>
    <picture>
      <source media="(min-width: 768px)" srcset={{this.large}} />
      <img
        alt={{@title}}
        class="absolute inset-0 size-full object-cover"
        decoding="async"
        loading={{this.loading}}
        src={{this.small}}
        {{on "error" this.onError}}
      />
    </picture>
  </template>
```

### Astro

Label: **1st-party** (2 of 2 points).

`<Image />` from `astro:assets` optimizes local and authorized remote images; Sharp is the default service; responsive `layout`/`srcset` since astro@5.10.0; `public/` images are not optimized. Cloudflare, Vercel, and Netlify adapters have host image services. ([images](https://docs.astro.build/en/guides/images/), [cloudflare](https://docs.astro.build/en/guides/integrations-guide/cloudflare/), [vercel](https://docs.astro.build/en/guides/integrations-guide/vercel/), [netlify](https://docs.astro.build/en/guides/integrations-guide/netlify/))

Example of building it yourself:

`<Image />` from `astro:assets` resizes and converts imported local images at build time. `layout="constrained"` adds a responsive `srcset`, and `image.domains` lets remote images through the same pipeline.

```astro
---
// src/components/Cover.astro
import { Image } from 'astro:assets';
import cover from '../assets/cover.jpg';
---
<Image src={cover} alt="Book cover" layout="constrained" width={800} height={600} />
```

```js
// astro.config.mjs
import { defineConfig } from 'astro/config';

export default defineConfig({
  image: {
    domains: ['covers.example.com'],
  },
});
```

Source: [Astro: Images](https://docs.astro.build/en/guides/images/)

Art direction with `<picture>` (1st-party, not scored):

`<Picture />` (astro@3.3.0+) emits `<picture>` with `formats` (default `webp`) plus a fallback `<img>`. Breakpoint art direction is not in the component docs; the official recipe uses `getImage()` and a hand-written `<picture>`/`<source media>`. ([astro-assets](https://docs.astro.build/en/reference/modules/astro-assets/), [build-custom-img-component](https://docs.astro.build/en/recipes/build-custom-img-component/))

`<Picture />` handles formats, not breakpoints. Astro's recipe calls `getImage()` once per crop and writes the `<picture>` by hand.

```astro
---
// src/components/Hero.astro
import { getImage } from "astro:assets";
import wide from "../assets/hero-wide.jpg";
import square from "../assets/hero-square.jpg";

const desktop = await getImage({ src: wide, width: 1600, format: "avif" });
const mobile = await getImage({ src: square, width: 600, format: "webp" });
const fallback = await getImage({ src: square, width: 600 });
---
<picture>
  <source media="(min-width: 768px)" srcset={desktop.src} type="image/avif" />
  <source srcset={mobile.src} type="image/webp" />
  <img src={fallback.src} {...fallback.attributes} alt="Shelves of books" />
</picture>
```

Source: [Astro: build a custom image component](https://docs.astro.build/en/recipes/build-custom-img-component/)

Gotchas:

- The Vercel image service requests `q=100` unless `quality` is set on `<Image>`.

### React Router

Label: **Third-party** (1 of 2 points).

No first-party image component or optimizer documented (only a `?url` asset import is shown); use a community package such as `@unpic/react` or a host image CDN by hand. ([styling](https://reactrouter.com/explanation/styling))

Example of building it yourself:

Install `@unpic/react` and render its `<Image>` in place of `<img>`. When it recognizes the image CDN in the URL, it writes a responsive `srcset` that asks the CDN for each width. It also sets `sizes`, dimensions and lazy loading.

```tsx
// app/features/book/components/book-cover.tsx
import { Image } from '@unpic/react'

export function BookCover({ src, title }: { src: string; title: string }) {
  return (
    <Image
      src={src}
      layout="constrained"
      width={300}
      height={450}
      alt={title}
    />
  )
}
```

Source: [Unpic: @unpic/react](https://unpic.pics/img/react/)

Art direction with `<picture>` (Manual, not scored):

No first-party `<picture>` helper documented; hand-write the markup. ([styling](https://reactrouter.com/explanation/styling))

There is no image component, so write `<picture>` in a route or component, with files served from `public/`. React spells the attribute `srcSet`.

```tsx
// app/features/home/hero-image.tsx
export function HeroImage() {
  return (
    <picture>
      {/* art direction: a square crop on narrow screens */}
      <source media="(max-width: 640px)" type="image/avif"
              srcSet="/media/hero-square-640.avif" width={640} height={640} />
      {/* format fallback: AVIF, then WebP, then the <img> JPEG */}
      <source type="image/avif" sizes="100vw"
              srcSet="/media/hero-1280.avif 1280w, /media/hero-1920.avif 1920w" />
      <source type="image/webp" sizes="100vw"
              srcSet="/media/hero-1280.webp 1280w, /media/hero-1920.webp 1920w" />
      <img src="/media/hero-1280.jpg" alt="Shelves of books" width={1280} height={720}
           fetchPriority="high" decoding="async" />
    </picture>
  )
}
```

Source: [MDN: the picture element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/picture)

### Qwik City

Label: **1st-party** (2 of 2 points).

built-in `?jsx` import suffix (the `qwikCity()` Vite plugin bundles `vite-imagetools`; the docs call it "a built-in feature ... no additional packages or components need to be installed"): `<img>` with `srcset` (200-1200w webp), `loading=lazy`, `decoding=async`, width/height. Local `src` images only per docs; `@unpic/qwik` is third-party (per the docs) and `qwik-image` is a separate CDN-loader component whose repo now sits in the QwikDev org. ([image-optimization](https://qwik.dev/docs/integrations/image-optimization/))

Example of building it yourself:

Add `?jsx` to a local image import to get a component. It renders an `<img>` with a webp `srcset` (200w to 1200w), `loading="lazy"`, `decoding="async"`, and width/height.

```tsx
// src/components/hero/hero.tsx
import { component$ } from '@builder.io/qwik'
import HeroImage from '~/media/hero.jpg?quality=80&jsx'

export const Hero = component$(() => (
  <HeroImage alt="Shelves of books" loading="eager" decoding="sync" />
))
```

Source: [Qwik: Image optimization](https://qwik.dev/docs/integrations/image-optimization/)

Art direction with `<picture>` (Manual, not scored):

`?jsx` emits `<img>`/`srcset` as webp (format overridable); the docs mention no `<picture>` or `sizes`, so no first-party `<picture>` documented. ([image-optimization](https://qwik.dev/docs/integrations/image-optimization/))

The `?jsx` image import only emits an `<img>`, so write `<picture>` in JSX yourself, with files served from `public/`. Qwik uses HTML attribute names such as `srcset`.

```tsx
// src/components/hero-image/hero-image.tsx
import { component$ } from '@builder.io/qwik'

export const HeroImage = component$(() => (
  <picture>
    {/* art direction: a square crop on narrow screens */}
    <source media="(max-width: 640px)" type="image/avif"
            srcset="/media/hero-square-640.avif" width={640} height={640} />
    {/* format fallback: AVIF, then WebP, then the <img> JPEG */}
    <source type="image/avif" sizes="100vw"
            srcset="/media/hero-1280.avif 1280w, /media/hero-1920.avif 1920w" />
    <source type="image/webp" sizes="100vw"
            srcset="/media/hero-1280.webp 1280w, /media/hero-1920.webp 1920w" />
    <img src="/media/hero-1280.jpg" alt="Shelves of books" width={1280} height={720}
         fetchPriority="high" decoding="async" />
  </picture>
))
```

Source: [MDN: the picture element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/picture)

### Angular (SSR)

Label: **1st-party** (2 of 2 points).

`NgOptimizedImage`: `priority` (fetchpriority=high, eager, SSR preload link), auto `srcset`, `placeholder` blur, lazy by default. Built-in loaders for Cloudflare Image Resizing, Cloudinary, ImageKit, Imgix, Netlify; it does not resize itself (the default loader is a no-op). ([image-optimization](https://angular.dev/guide/image-optimization))

Example of building it yourself:

`NgOptimizedImage` with a built-in loader. The loader builds CDN URLs for each `ngSrcset` width; `priority` marks the LCP image and `placeholder` shows a low-res blur from the same CDN.

```ts
// src/app/app.config.ts
import { provideImgixLoader } from '@angular/common';

export const appConfig: ApplicationConfig = {
  providers: [provideImgixLoader('https://books.imgix.net/')],
};

// src/app/book/book-cover.ts
import { NgOptimizedImage } from '@angular/common';

@Component({
  selector: 'app-book-cover',
  imports: [NgOptimizedImage],
  template: `
    <img [ngSrc]="src()" width="400" height="600" [alt]="title()"
         ngSrcset="200w, 400w, 800w" sizes="(max-width: 640px) 50vw, 200px"
         [priority]="priority()" placeholder />
  `,
})
export class BookCover { /* … */ }
```

Source: [Angular: Getting started with NgOptimizedImage](https://angular.dev/guide/image-optimization)

Art direction with `<picture>` (Manual, not scored):

The `NgOptimizedImage` page says `<picture>` is not supported yet ("on our roadmap"); no art direction or `<source type>` format fallback is documented. Format is left to the configured image-CDN loader (the page says only that the loader sets "size, format, and image quality transformations"). No first-party `<picture>` documented; hand-write it. ([image-optimization](https://angular.dev/guide/image-optimization))

NgOptimizedImage can't render `<picture>`, so write the element in a component template with plain `<source>` tags for format fallback and art direction.

```ts
// src/app/home/hero-image.ts
import { ChangeDetectionStrategy, Component } from '@angular/core';

@Component({
  selector: 'app-hero-image',
  changeDetection: ChangeDetectionStrategy.OnPush,
  template: `
    <picture>
      <!-- art direction: a square crop on narrow screens -->
      <source media="(max-width: 640px)" type="image/avif"
              srcset="/media/hero-square-640.avif" width="640" height="640" />
      <!-- format fallback: AVIF, then WebP, then the <img> JPEG -->
      <source type="image/avif" sizes="100vw"
              srcset="/media/hero-1280.avif 1280w, /media/hero-1920.avif 1920w" />
      <source type="image/webp" sizes="100vw"
              srcset="/media/hero-1280.webp 1280w, /media/hero-1920.webp 1920w" />
      <img src="/media/hero-1280.jpg" alt="Shelves of books" width="1280" height="720"
           fetchpriority="high" decoding="async" />
    </picture>
  `,
})
export class HeroImage {}
```

Source: [Angular image optimization FAQ](https://angular.dev/guide/image-optimization)

### Marko

Label: **Third-party** (1 of 2 points).

No image component or optimizer documented; the native-tag page and the full reference contain only an `og:image` meta example and plain `<img>`. `@marko/vite` rewrites static relative `<img src>` paths to hashed Vite assets but does not resize or convert. A host image CDN wired by hand is the third-party route, as for React Router and Ember. ([native-tag](https://markojs.com/docs/reference/native-tag))

Example of building it yourself:

Marko has no image component, so a small tag builds a `srcset` against the host's image CDN. This one uses Netlify Image CDN URLs; remote sources must be allowlisted in `netlify.toml`.

```marko
// src/tags/book-cover.marko
export interface Input { src: string; title: string; sizes: string; priority?: boolean }

static const WIDTHS = [160, 320, 640];
static function cdn(src: string, w: number) {
  return `/.netlify/images?url=${encodeURIComponent(src)}&w=${w}&q=75`;
}

<img
  src=cdn(input.src, 320)
  srcset=WIDTHS.map((w) => `${cdn(input.src, w)} ${w}w`).join(", ")
  sizes=input.sizes
  alt=input.title
  width=320 height=480
  loading=(input.priority ? "eager" : "lazy")
  fetchpriority=(input.priority ? "high" : undefined)
/>
```

```toml
# netlify.toml
[images]
  remote_images = ['https://images\.gr-assets\.com/.*']
```

Source: [Netlify: Image CDN overview](https://docs.netlify.com/build/image-cdn/overview/)

Art direction with `<picture>` (Manual, not scored):

All native HTML tags are supported, so `<picture>` is hand-written. No first-party image helper documented on the native-tag page or in the full reference. ([native-tag](https://markojs.com/docs/reference/native-tag))

Marko renders native tags as-is, so you write `<picture>` in a custom tag. You also produce each format and crop yourself and put them in `public/`.

```marko
// src/tags/hero-image.marko
export interface Input {
  alt: string;
  priority?: boolean;
}

<picture>
  <source media="(min-width: 1000px)" type="image/avif" srcset="/hero-wide.avif">
  <source media="(min-width: 1000px)" srcset="/hero-wide.jpg">
  <source type="image/avif" srcset="/hero-tall.avif">
  <img
    src="/hero-tall.jpg"
    alt=input.alt
    width=750
    height=1334
    decoding="async"
    fetchpriority=(input.priority ? "high" : undefined)
    loading=(input.priority ? "eager" : "lazy")
  >
</picture>
```

Source: [Marko native tags](https://markojs.com/docs/reference/native-tag)

### Fresh

Label: **Third-party** (1 of 2 points).

The docs say there is no built-in optimization pipeline and suggest `vite-imagetools` or a CDN. Fresh adds long-lived cache headers to `src`/`srcset` (opt out with `data-fresh-disable-lock`); `asset()` / `assetSrcSet()` exist in `fresh/runtime`. ([static-files](https://usefresh.dev/docs/concepts/static-files), [api-reference](https://usefresh.dev/docs/advanced/api-reference))

Example of building it yourself:

Fresh 2 builds with Vite, so `vite-imagetools` resizes and converts images at build time. The query string on the import picks widths and format, and `as=srcset` returns a ready `srcset` string.

```ts
// vite.config.ts
import { defineConfig } from "vite";
import { fresh } from "@fresh/plugin-vite";
import { imagetools } from "vite-imagetools";

export default defineConfig({
  plugins: [fresh(), imagetools()],
});
```

```tsx
// routes/about.tsx
import heroAvif from "../static/hero.jpg?format=avif&w=800";
import heroSrcset from "../static/hero.jpg?w=400;800;1200&format=webp&as=srcset";

export default function About() {
  return <img src={heroAvif} srcset={heroSrcset} sizes="100vw" alt="Shelves of books" width={800} />;
}
```

Source: [Fresh: Static files](https://usefresh.dev/docs/concepts/static-files)

Art direction with `<picture>` (Manual, not scored):

No first-party `<picture>` component documented; the docs point to `vite-imagetools` or a CDN, with markup hand-written. ([static-files](https://usefresh.dev/docs/concepts/static-files))

You write the `<picture>` markup in a Preact component and put each pre-encoded format and crop in `static/` yourself.

```tsx
// components/Hero.tsx
export function Hero() {
  return (
    <picture>
      <source media="(min-width: 1000px)" type="image/avif" srcset="/hero-wide.avif" />
      <source media="(min-width: 1000px)" srcset="/hero-wide.jpg" />
      <source type="image/avif" srcset="/hero-tall.avif" />
      <img
        src="/hero-tall.jpg"
        alt="Shelves of books"
        width={750}
        height={1334}
        fetchPriority="high"
        decoding="async"
      />
    </picture>
  );
}
```

Source: [Fresh static files](https://usefresh.dev/docs/concepts/static-files)

### Analog

Label: **1st-party** (2 of 2 points).

Angular's `NgOptimizedImage` from `@angular/common`, a required dependency of every Analog app: `ngSrc`, `priority`, automatic `srcset`, lazy loading, and loaders for Cloudflare, Cloudinary, ImageKit, Imgix and Netlify. It is an Angular-team package, and the Analog docs do not cover images. ([image-optimization](https://angular.dev/guide/image-optimization))

Example of building it yourself:

Import `NgOptimizedImage` from `@angular/common` and use `ngSrc`. Width and height are required, `priority` marks the LCP image, and a loader provider builds CDN URLs.

```ts
// src/app/pages/index.page.ts
import { Component } from '@angular/core';
import { NgOptimizedImage } from '@angular/common';

@Component({
  imports: [NgOptimizedImage],
  template: `
    <img ngSrc="covers/dune.jpg" width="400" height="600" priority />
    <img ngSrc="covers/emma.jpg" ngSrcset="200w, 400w" sizes="50vw" width="400" height="600" />
  `,
})
export default class HomePage {}

// src/app/app.config.ts
// providers: [provideImgixLoader('https://books.imgix.net/'), /* … */]
```

Source: [Angular: Image optimization](https://angular.dev/guide/image-optimization)

Art direction with `<picture>` (Manual, not scored):

The `NgOptimizedImage` page says `<picture>` is not supported yet; hand-write the markup. ([image-optimization](https://angular.dev/guide/image-optimization))

NgOptimizedImage can't render `<picture>`, so write the element in a page template with plain `<source>` tags. Files in `public/` are served from the site root.

```ts
// src/app/pages/index.page.ts
import { Component } from '@angular/core';

@Component({
  selector: 'app-home',
  template: `
    <picture>
      <!-- art direction: a square crop on narrow screens -->
      <source media="(max-width: 640px)" type="image/avif"
              srcset="/media/hero-square-640.avif" width="640" height="640" />
      <source type="image/avif" sizes="100vw"
              srcset="/media/hero-1280.avif 1280w, /media/hero-1920.avif 1920w" />
      <img src="/media/hero-1280.jpg" alt="Shelves of books" width="1280" height="720"
           fetchpriority="high" decoding="async" />
    </picture>
  `,
})
export default class HomePage {}
```

Source: [Angular image optimization FAQ](https://angular.dev/guide/image-optimization)

### Vike

Label: **Third-party** (1 of 2 points).

No image component or optimizer documented; the `+image` setting only sets the `og:image` preview. Use a community package such as `@unpic/react` or a host image CDN. ([image](https://vike.dev/image), [static-directory](https://vike.dev/static-directory))

Example of building it yourself:

Use `<Image>` from `@unpic/react`. It builds a `srcset` for the image CDN that serves the URL and sets width, height and lazy loading.

```tsx
// pages/book/@id/+Page.tsx
import { Image } from '@unpic/react'
import { useData } from 'vike-react/useData'

export function Page() {
  const book = useData<{ title: string; coverUrl: string }>()
  return (
    <Image src={book.coverUrl} layout="constrained" width={400} height={600} alt={book.title} priority />
  )
}
```

Source: [Unpic: React](https://unpic.pics/img/react/)

Art direction with `<picture>` (Manual, not scored):

No first-party `<picture>` helper documented; hand-write the markup. ([image](https://vike.dev/image))

Vike has no image component, so write `<picture>` in the page. With `@unpic/react`, each `<Source>` gets a `media` query and its own crop, and `<Image>` is the fallback.

```tsx
// pages/book/@id/BookCover.tsx
import { Image, Source } from '@unpic/react'

export function BookCover({ title, coverUrl, wideUrl }: { title: string; coverUrl: string; wideUrl: string }) {
  return (
    <picture>
      {/* art direction: a wide banner crop on large screens */}
      <Source media="(min-width: 768px)" src={wideUrl} layout="constrained" width={1200} height={400} />
      <Image src={coverUrl} alt={title} layout="constrained" width={400} height={600} priority />
    </picture>
  )
}
```

Source: [Unpic: React](https://unpic.pics/img/react/) · [MDN: the picture element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/picture)

### RedwoodSDK

Label: **Third-party** (1 of 2 points).

No image component or optimizer documented; images are plain `<img>` tags served from `public/`. The third-party route is the host's [Cloudflare Images transformations](https://developers.cloudflare.com/images/transform-images/), wired by hand. ([public-assets](https://docs.rwsdk.com/guides/frontend/public-assets))

Example of building it yourself:

Turn on Cloudflare Images transformations for the zone, then build `/cdn-cgi/image/<OPTIONS>/<SOURCE>` URLs by hand. This helper writes a `srcSet` that asks Cloudflare for each width in the best format the browser accepts.

```tsx
// src/app/components/CfImage.tsx
const cf = (src: string, width: number) =>
  `/cdn-cgi/image/width=${width},quality=75,format=auto${src}`;

export function CfImage({ src, alt, width, height }: {
  src: string; alt: string; width: number; height: number;
}) {
  return (
    <img
      src={cf(src, width)}
      srcSet={[1, 2].map((d) => `${cf(src, width * d)} ${width * d}w`).join(", ")}
      sizes={`${width}px`}
      alt={alt} width={width} height={height} loading="lazy" decoding="async"
    />
  );
}
```

Source: [Cloudflare Images: Transform via URL](https://developers.cloudflare.com/images/transform-images/transform-via-url/)

Art direction with `<picture>` (Manual, not scored):

No first-party `<picture>` helper documented; hand-write the markup. ([public-assets](https://docs.rwsdk.com/guides/frontend/public-assets))

There is no image component, so write the `<picture>` by hand in a server component. Wide screens get a landscape crop and narrow screens get a square one, both served from `public/`. React spells the attribute `srcSet`.

```tsx
// src/app/components/Hero.tsx
export function Hero() {
  return (
    <picture>
      {/* art direction: a square crop on narrow screens */}
      <source media="(max-width: 640px)" srcSet="/images/hero-square-640.webp"
              width={640} height={640} />
      <source media="(min-width: 641px)" srcSet="/images/hero-wide-1600.webp"
              width={1600} height={900} />
      <img src="/images/hero-wide-1600.jpg" alt="Shelves of books"
           width={1600} height={900} fetchPriority="high" decoding="async" />
    </picture>
  );
}
```

Source: [MDN: the picture element](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/picture) · [RedwoodSDK: Public Assets](https://docs.rwsdk.com/guides/frontend/public-assets)

### Remix 3

Label: **Third-party** (1 of 2 points).

The asset server has a first-party transform pipeline: `files.transforms` defined with `defineFileTransform`, requested as `assets.getHref(path, { transform: [["resize", "400"], "webp"] })`, with `createFsFileCache()` for results. The resize and format code is written by the app with the third-party Sharp library, and there is no image component or `srcset` helper. ([files-and-assets](https://docs.remix.run/files-and-assets/), [assets](https://docs.remix.run/api/assets/))

Example of building it yourself:

The asset server runs named file transforms that the app writes with Sharp. A URL picks the chain, and `createFsFileCache()` keeps the results on disk.

```ts
// app/assets.ts  (npm i sharp)
import { createAssetServer, createFsFileCache, defineFileTransform } from "remix/assets";
import sharp from "sharp";

export const assets = createAssetServer({
  // …
  files: {
    extensions: [".png", ".jpg"],
    transforms: {
      resize: defineFileTransform({
        extensions: [".png", ".jpg"],
        param: true,
        // check that param is a width in range before using it
        transform: (bytes, { param }) => sharp(bytes).resize({ width: Number(param) }).toBuffer(),
      }),
      webp: defineFileTransform({
        extensions: [".png", ".jpg"],
        transform: async (bytes) => ({ content: await sharp(bytes).webp().toBuffer(), extension: ".webp" }),
      }),
    },
    cache: createFsFileCache(),
  },
});

// in an action
let coverHref = await assets.getHref("app/ui/public/cover.jpg", { transform: [["resize", "400"], "webp"] });
```

Source: [Remix: Files and assets, transform images and other files](https://docs.remix.run/files-and-assets/)

Art direction with `<picture>` (Manual, not scored):

No first-party `<picture>` helper documented; hand-write `<picture>` with transform URLs from `assets.getHref()`. ([files-and-assets](https://docs.remix.run/files-and-assets/))

There is no image component, so write `<picture>` yourself. Resolve each crop and format with `assets.getHref()` transforms in the action and pass the URLs in as props.

```tsx
// app/ui/hero-image.tsx
import type { Handle } from "remix/component";
import { assets } from "../assets.ts";

export async function getHeroSources() {
  let get = (file: string, transform: (string | [string, string])[]) => assets.getHref(`app/ui/public/${file}`, { transform });
  return {
    square: await get("hero-square.jpg", [["resize", "640"], "webp"]),
    wide: await get("hero-wide.jpg", [["resize", "1280"], "webp"]),
    fallback: await get("hero-wide.jpg", [["resize", "1280"]]),
  };
}

export function HeroImage(handle: Handle<Awaited<ReturnType<typeof getHeroSources>>>) {
  return () => (
    <picture>
      {/* art direction: a square crop on narrow screens */}
      <source media="(max-width: 640px)" type="image/webp" srcset={handle.props.square} />
      <source type="image/webp" srcset={handle.props.wide} />
      <img src={handle.props.fallback} alt="Shelves of books" width={1280} height={720}
           fetchpriority="high" decoding="async" />
    </picture>
  );
}
```

Source: [Remix: Files and assets, transform images and other files](https://docs.remix.run/files-and-assets/)

### Void (React)

Label: **Third-party** (1 of 2 points).

No image component or optimizer documented; the head guide covers only `og:image` URLs, and Markdown images are lazy-loaded. Use a community package such as Unpic or a host image CDN. ([head](https://void.cloud/guide/pages-routing/head), [markdown](https://void.cloud/guide/pages-routing/markdown))

Example of building it yourself:

Void has no image component. Resize and re-encode at build time with `vite-imagetools` query imports, and write `width`, `height` and `loading` yourself. For remote covers, use `@unpic/react` with an image CDN.

```tsx
// components/Cover.tsx
import srcset from './cover.jpg?w=320;640;960&format=webp&as=srcset'
import fallback from './cover.jpg?w=640&format=webp'

export function Cover({ title }: { title: string }) {
  return (
    <img src={fallback} srcSet={srcset} sizes="320px" width={320} height={480} loading="lazy" decoding="async" alt={title} />
  )
}
```

Source: [vite-imagetools](https://github.com/JonasKruckenberg/imagetools) · [Unpic](https://unpic.pics/img/)

Art direction with `<picture>` (Manual, not scored):

No first-party `<picture>` helper documented; hand-write the markup. ([head](https://void.cloud/guide/pages-routing/head))

Write the `<picture>` by hand. The `?as=srcset` imports give each `<source>` its own format or crop, and the `<img>` is the fallback.

```tsx
// components/Cover.tsx
import avif from './cover.jpg?w=320;640;960&format=avif&as=srcset'
import webp from './cover.jpg?w=320;640;960&format=webp&as=srcset'
import fallback from './cover.jpg?w=640&format=webp'

export function Cover({ title }: { title: string }) {
  return (
    <picture>
      <source type="image/avif" srcSet={avif} sizes="320px" />
      <img src={fallback} srcSet={webp} sizes="320px" width={320} height={480} alt={title} />
    </picture>
  )
}
```

Source: [vite-imagetools: as=srcset](https://github.com/JonasKruckenberg/imagetools/blob/main/docs/directives.md) · [MDN: `<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture)

### Void (Vue)

Label: **Third-party** (1 of 2 points).

No image component or optimizer documented; the head guide covers only `og:image` URLs, and Markdown images are lazy-loaded. Use a community package such as Unpic or a host image CDN. ([head](https://void.cloud/guide/pages-routing/head), [markdown](https://void.cloud/guide/pages-routing/markdown))

Example of building it yourself:

Void has no image component. Resize and re-encode at build time with `vite-imagetools` query imports, and write `width`, `height` and `loading` yourself. For remote covers, use `@unpic/vue` with an image CDN.

```vue
<!-- components/Cover.vue -->
<script setup lang="ts">
import srcset from './cover.jpg?w=320;640;960&format=webp&as=srcset'
import fallback from './cover.jpg?w=640&format=webp'
defineProps<{ title: string }>()
</script>

<template>
  <img :src="fallback" :srcset="srcset" sizes="320px" width="320" height="480" loading="lazy" decoding="async" :alt="title" />
</template>
```

Source: [vite-imagetools](https://github.com/JonasKruckenberg/imagetools) · [Unpic](https://unpic.pics/img/vue/)

Art direction with `<picture>` (Manual, not scored):

No first-party `<picture>` helper documented; hand-write the markup. ([head](https://void.cloud/guide/pages-routing/head))

Write the `<picture>` by hand. The `?as=srcset` imports give each `<source>` its own format or crop, and the `<img>` is the fallback.

```vue
<!-- components/Cover.vue -->
<script setup lang="ts">
import avif from './cover.jpg?w=320;640;960&format=avif&as=srcset'
import webp from './cover.jpg?w=320;640;960&format=webp&as=srcset'
import fallback from './cover.jpg?w=640&format=webp'
defineProps<{ title: string }>()
</script>

<template>
  <picture>
    <source type="image/avif" :srcset="avif" sizes="320px" />
    <img :src="fallback" :srcset="webp" sizes="320px" width="320" height="480" :alt="title" />
  </picture>
</template>
```

Source: [vite-imagetools: as=srcset](https://github.com/JonasKruckenberg/imagetools/blob/main/docs/directives.md) · [MDN: `<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture)

### Void (Svelte)

Label: **Third-party** (1 of 2 points).

No image component or optimizer documented; the head guide covers only `og:image` URLs, and Markdown images are lazy-loaded. Use a community package such as Unpic or a host image CDN. ([head](https://void.cloud/guide/pages-routing/head), [markdown](https://void.cloud/guide/pages-routing/markdown))

Example of building it yourself:

Void has no image component. For remote covers, use `@unpic/svelte` with an image CDN; for local files, resize and re-encode at build time with `vite-imagetools` query imports. Either way write `width`, `height` and `loading` yourself.

```svelte
<!-- components/Cover.svelte -->
<script lang="ts">
  import { Image } from '@unpic/svelte'
  let { src, title } = $props()
</script>

<Image {src} cdn="ipx" layout="fixed" width={320} height={480} loading="lazy" alt={title} />
```

Source: [Unpic](https://unpic.pics/img/svelte/) · [vite-imagetools](https://github.com/JonasKruckenberg/imagetools)

Art direction with `<picture>` (Manual, not scored):

No first-party `<picture>` helper documented; hand-write the markup. ([head](https://void.cloud/guide/pages-routing/head))

Write the `<picture>` by hand. The `?as=srcset` imports give each `<source>` its own format or crop, and the `<img>` is the fallback.

```svelte
<!-- components/Cover.svelte -->
<script lang="ts">
  import avif from './cover.jpg?w=320;640;960&format=avif&as=srcset'
  import webp from './cover.jpg?w=320;640;960&format=webp&as=srcset'
  import fallback from './cover.jpg?w=640&format=webp'
  let { title } = $props()
</script>

<picture>
  <source type="image/avif" srcset={avif} sizes="320px" />
  <img src={fallback} srcset={webp} sizes="320px" width="320" height="480" alt={title} />
</picture>
```

Source: [vite-imagetools: as=srcset](https://github.com/JonasKruckenberg/imagetools/blob/main/docs/directives.md) · [MDN: `<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture)

### Void (Solid)

Label: **Third-party** (1 of 2 points).

No image component or optimizer documented; the head guide covers only `og:image` URLs, and Markdown images are lazy-loaded. Use a community package such as Unpic or a host image CDN. ([head](https://void.cloud/guide/pages-routing/head), [markdown](https://void.cloud/guide/pages-routing/markdown))

Example of building it yourself:

Void has no image component. Resize and re-encode at build time with `vite-imagetools` query imports, and write `width`, `height` and `loading` yourself. For remote covers, use `@unpic/solid` with an image CDN.

```tsx
// components/Cover.tsx
import srcset from './cover.jpg?w=320;640;960&format=webp&as=srcset'
import fallback from './cover.jpg?w=640&format=webp'

export function Cover(props: { title: string }) {
  return (
    <img src={fallback} srcset={srcset} sizes="320px" width={320} height={480} loading="lazy" decoding="async" alt={props.title} />
  )
}
```

Source: [vite-imagetools](https://github.com/JonasKruckenberg/imagetools) · [Unpic](https://unpic.pics/img/solid/)

Art direction with `<picture>` (Manual, not scored):

No first-party `<picture>` helper documented; hand-write the markup. ([head](https://void.cloud/guide/pages-routing/head))

Write the `<picture>` by hand. The `?as=srcset` imports give each `<source>` its own format or crop, and the `<img>` is the fallback.

```tsx
// components/Cover.tsx
import avif from './cover.jpg?w=320;640;960&format=avif&as=srcset'
import webp from './cover.jpg?w=320;640;960&format=webp&as=srcset'
import fallback from './cover.jpg?w=640&format=webp'

export function Cover(props: { title: string }) {
  return (
    <picture>
      <source type="image/avif" srcset={avif} sizes="320px" />
      <img src={fallback} srcset={webp} sizes="320px" width={320} height={480} alt={props.title} />
    </picture>
  )
}
```

Source: [vite-imagetools: as=srcset](https://github.com/JonasKruckenberg/imagetools/blob/main/docs/directives.md) · [MDN: `<picture>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/picture)

---

HTML version: https://framework-compare.vercel.app/features/image-pipeline · All pages: https://framework-compare.vercel.app/llms.txt · Data: https://framework-compare.vercel.app/api/index.json
