A CLI to take screenshots of websites and generate open graph images from your own computer.
AGPL-3.0 License
A CLI to take screenshots of websites and generate open graph images from your own computer. Having a website with a screenshot as an open graph image is a great way to promote your website and attract more visitors.
Notes:
npm i -g og-screenshots
Or you can also directly execute the command:
npx og-screenshots --url "https://example.com"
Usage
$ og-screenshots [input]
Options
--url, -u <type> Input URL (required). Can be a sitemap, RSS feed or a single URL. When using a sitemap or RSS feed, this command will automatically detect the URLs in the feed or sitemap and process them.
--transform, -t Transform origin [Default: false]
--timeout, -T <type> Timeout in milliseconds [Default: 60000]
--extension, -e <type> File extension [Default: webp]
--concurrency, -c <type> Concurrency level [Default: 3]
--quality, -q <type> Image quality [Default: 100]
--max-screenshots, -m <type> Maximum number of screenshots [Default: 0]
--recommended-size, -r <type> Recommended image size [Default: {"width":1200,"height":630}]
--output-dir, -o <type> Output directory [Default: ./public/screenshots]
--window-size, -w <type> Browser window size [Default: 1300,1300]
--chrome-path <type> Path to Chrome [Default: detected Chrome path]
--imagemagick-path <type> Path to ImageMagick [Default: detected ImageMagick path]
--overwrite Overwrite existing files [Default: false]. By default, the command will not take screenshots if the output file already exists.
Examples
$ og-screenshots --url "http://example.com"
Run
npx tsx source/cli.tsx --url "https://example.com"
Affero General Public License v3.0