# gatsby-plugin-screenshot

> Screenshots all routes of a Gatsby project.

Latest version **2.1.1** (published 2022-10-15) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install gatsby-plugin-screenshot
pnpm add gatsby-plugin-screenshot
yarn add gatsby-plugin-screenshot
bun add gatsby-plugin-screenshot
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.1.1 |
| Published | 2022-10-15 |
| First published | 2019-10-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=14.0.0 |
| Dependencies | 6 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 20 |
| Maintainers | salper, neoziro |
| Keywords | gatsby, screenshot |

## Links

- npm: https://www.npmjs.com/package/gatsby-plugin-screenshot
- Repository: https://github.com/argos-ci/argos-javascript
- Homepage: https://github.com/argos-ci/argos-javascript/tree/main/packages/gatsby-plugin-screenshot#readme
- Issues: https://github.com/argos-ci/argos-javascript/issues
- npm.io page: https://npm.io/package/gatsby-plugin-screenshot

## Dependencies (6)

- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.4
- [wait-on](https://npm.io/package/wait-on.md) ^6.0.1
- [puppeteer](https://npm.io/package/puppeteer.md) ^19.0.0
- [cross-spawn](https://npm.io/package/cross-spawn.md) ^7.0.3
- [@babel/runtime](https://npm.io/package/@babel/runtime.md) ^7.19.4
- [lodash.kebabcase](https://npm.io/package/lodash.kebabcase.md) ^4.1.1

## Recent versions

- 2.1.1 (latest) — 2022-10-15
- 2.1.0 — 2022-09-06
- 2.0.2 — 2022-08-09
- 2.0.1 — 2022-08-08
- 2.0.0 — 2022-08-02
- 1.0.0 — 2019-10-24
- 0.1.2 — 2019-10-24
- 0.1.1 — 2019-10-24
- 0.1.0 — 2019-10-24

## README

# gatsby-plugin-screenshot

Screenshots all your pages in a configured directory.

Puppeteer is a Chrome headless framework which allows you to render your app in Chromium.

With this plugin, all you Gatsby pages will be browsed and screenshotted. You can then use
these screenshots as documentation or to avoid visual regressions with services like [Argos](https://www.argos-ci.com/).

## Install

`npm install --save-dev gatsby-plugin-screenshot`

## How to use

Just add the plugin to the plugins array in your `gatsby-config.js`

```javascript
plugins: [`gatsby-plugin-screenshot`];
```

By default, the plugin will run `gatsby serve` to port 8000, and save screenshots in `./screenshots` directory.
You can configure the default behaviour using the followin plugin options:

```javascript
// in your gatsby-config.js
module.exports = {
  plugins: [
    {
      resolve: `gatsby-plugin-screenshot`,
      options: {
        // The puppeteer launch options
        browser: {
          args: [
            "--no-sandbox",
            "--disable-setuid-sandbox",
            "--start-fullscreen",
          ],
        },
        dir: "./screenshots",
        port: 8000,
      },
    },
  ],
};
```

---
_Source: https://npm.io/package/gatsby-plugin-screenshot · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
