Skip to content

Utility for taking website screenshots at different viewports.

Notifications You must be signed in to change notification settings

4ormat/template-screenshots

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

template-screenshots

Utility for taking website screenshots at different viewports.

Setup

Install Dependencies

nvm use
npm install

Add API Keys

touch .env

.env file should look like

CLOUD_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=

Available Scripts

npm run screenshots <url>

Pass any target url to the script above in order to produce multiple screencaptures of a webpage at different viewport sizes. We use the Cloudinary SDK in conjunction with the URL2PNG API to make this happen. [(https://cloudinary.com/documentation/url2png_website_screenshots_addon)]. Cloudinary creates a transformed url from the target, which URL2PNG then uses to produce a customized screenshot.

Screenshots have been configured to always capture the full height of the webpage provided.

Viewport widths for screenshots are defined as follows:

  • Desktop: 1440px
  • Tablet: 766px
  • Mobile: 390px

About

Utility for taking website screenshots at different viewports.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published