Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-plugin-screenshot

Package Overview
Dependencies
Maintainers
2
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-screenshot

Screenshots all routes of a Gatsby project.

  • 2.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
increased by900%
Maintainers
2
Weekly downloads
 
Created
Source

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.

Install

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

How to use

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

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:

// 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,
      },
    },
  ],
};

Keywords

FAQs

Package last updated on 15 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc