# screenshots manifest member

> The screenshots member lists wide or narrow images that Chrome 94 on Android and Chrome 108 on desktop show in the richer install dialog.

The `screenshots` manifest member lets you supply an array of images showing the app in use. Browsers with a richer
install dialog render them as a carousel next to the `description`; app stores that package web
apps copy them into the listing. Without the member the install prompt is the compact one with
icon, name, and origin only.

Chrome 94 on Android and Chrome 108 on desktop read the member and switch to the richer dialog
when at least one screenshot fits the device ([Richer PWA installation](https://developer.chrome.com/blog/richer-pwa-installation) and
[Richer install UI on desktop](https://developer.chrome.com/blog/richer-install-ui-desktop), developer.chrome.com). MDN treats the member as app-store metadata to which browser compatibility does not
apply, and browser-compat-data's [`manifests/webapp` directory](https://github.com/mdn/browser-compat-data/tree/main/manifests/webapp) has no
`screenshots` entry.

## Member

| Property | Value |
|---|---|
| Type | Array of image-resource objects. Each has `src` (URL, resolved against the manifest), `sizes` (`WIDTHxHEIGHT` in pixels), optional `type` (`image/png`, `image/jpeg`, `image/webp`), optional `form_factor` (`"wide"` for desktop and landscape tablets, `"narrow"` for phones), an optional `label` read by assistive technology, and an optional `platform` hint for stores. |
| Default | An empty array; the browser shows its compact install prompt. |

For example, `[{ "src": "/shots/home.png", "sizes": "1080x1920", "type": "image/png",
  "form_factor": "narrow", "label": "Today's tasks" }]`.

Chromium applies limits per form factor. The desktop dialog takes screenshots tagged `wide`, at
most 8; the Android dialog takes screenshots tagged `narrow` or untagged, at most 5. Each
screenshot must be between 320 and 3840 pixels on each side and keep the aspect ratio of the first
screenshot with the same `form_factor`, or it is skipped. A `sizes` value that does not match the
decoded image is also skipped. The desktop dialog only appears when a `wide` screenshot exists, so
a manifest with only phone screenshots keeps the compact prompt on Windows and macOS.

Screenshots are fetched when the install dialog opens, not at page load, so their weight does not
touch the page's loading metrics; they do need to be served with the same caching discipline as
icons because Chrome does not re-fetch them until the next manifest update.

:::note
DevTools' manifest view ([`AppManifestView.ts`](https://github.com/ChromeDevTools/devtools-frontend/blob/main/front_end/panels/application/AppManifestView.ts)) counts the screenshots whose `form_factor` is `wide`. When there are none, it adds the line "Richer PWA install UI won’t be available on desktop. Add at least one screenshot with the form_factor set to wide." under **Errors and warnings**. It adds a matching line for mobile when the screenshots are all `wide`. The same file also warns when more than 8 `wide` or more than 5 other screenshots are listed, and when screenshots with the same `form_factor` differ in aspect ratio.
:::

## Examples

One `wide` and two `narrow` screenshots satisfy both Chromium dialogs. The `wide` image keeps a
16:10 ratio and the two `narrow` images share 9:19.5, which is the same-ratio rule applied per
form factor.

### Serving both the desktop and the phone dialog

```json
{
  "screenshots": [
    {
      "src": "/shots/desktop-overview.png",
      "sizes": "1280x800",
      "type": "image/png",
      "form_factor": "wide",
      "label": "Dashboard with the week's totals and a chart of spending by category"
    },
    {
      "src": "/shots/phone-today.png",
      "sizes": "1080x2340",
      "type": "image/png",
      "form_factor": "narrow",
      "label": "Today view listing three open tasks"
    },
    {
      "src": "/shots/phone-add.png",
      "sizes": "1080x2340",
      "type": "image/png",
      "form_factor": "narrow",
      "label": "Add-task sheet with amount and category fields"
    }
  ]
}
```

Order matters within a form factor: the first entry fixes the aspect ratio the others must match,
and it is the one shown before the user scrolls.

### Writing labels that stand in for the image

`label` is the only text a screen reader gets for a screenshot, and stores reuse it as a caption.
Describe what the screen shows, not the fact that it is a screenshot.

```json
{
  "screenshots": [
    {
      "src": "/shots/phone-map.webp",
      "sizes": "1170x2532",
      "type": "image/webp",
      "form_factor": "narrow",
      "label": "Map of the route from Oslo to Bergen with the next stop highlighted"
    }
  ]
}
```

A label such as `"Screenshot 1"` passes validation and tells the user nothing; Chrome reads the
string verbatim.

### Mirroring the screenshots in a custom install button

Nothing at runtime reports whether the browser rendered the richer dialog. What a page can do is
defer the prompt with `beforeinstallprompt` and show its own preview using the same images, then
call `prompt()` so the browser's dialog (richer or compact) follows. Browsers without the event
take the fallback branch and show nothing.

```js
let deferredPrompt = null;

window.addEventListener('beforeinstallprompt', (event) => {
  event.preventDefault();
  deferredPrompt = event;
  document.querySelector('#install').hidden = false; // the button shows the same /shots/ images
});

document.querySelector('#install').addEventListener('click', async () => {
  if (!deferredPrompt) return; // Safari, Firefox: no prompt to show, leave the button hidden
  deferredPrompt.prompt();
  const { outcome } = await deferredPrompt.userChoice;
  deferredPrompt = null;
  console.log(`install ${outcome}`); // "accepted" or "dismissed"
});
```

Reuse the manifest's `/shots/` files in the button's preview so the
preview and the browser dialog stay in step.

## See also

- [description manifest member](/reference/manifest/description/)
- [icons manifest member](/reference/manifest/icons/)
- [Richer install UI: enriching the install prompt with description and screenshots](/reference/installation/richer-install-ui/)
- [beforeinstallprompt and custom install prompts](/reference/installation/install-prompt/)
- [Web App Manifest - Application Information: screenshots member](https://www.w3.org/TR/manifest-app-info/#screenshots-member) (w3.org)
- [Richer install UI available for desktop](https://developer.chrome.com/blog/richer-install-ui-desktop) (developer.chrome.com)