{"id":15304948,"url":"https://github.com/nicnocquee/og-screenshots","last_synced_at":"2025-04-14T23:13:02.442Z","repository":{"id":238368940,"uuid":"796282945","full_name":"nicnocquee/og-screenshots","owner":"nicnocquee","description":"A CLI to take screenshots of websites and generate open graph images from your own computer. ","archived":false,"fork":false,"pushed_at":"2024-05-10T10:16:27.000Z","size":1306,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T23:12:57.725Z","etag":null,"topics":["og-image","opengraph","opengraph-images","screenshots"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/og-screenshots","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicnocquee.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-05T13:47:30.000Z","updated_at":"2024-10-13T22:11:40.000Z","dependencies_parsed_at":"2024-05-10T11:28:52.536Z","dependency_job_id":null,"html_url":"https://github.com/nicnocquee/og-screenshots","commit_stats":null,"previous_names":["nicnocquee/og-screenshots"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicnocquee%2Fog-screenshots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicnocquee%2Fog-screenshots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicnocquee%2Fog-screenshots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicnocquee%2Fog-screenshots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicnocquee","download_url":"https://codeload.github.com/nicnocquee/og-screenshots/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248975328,"owners_count":21192210,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["og-image","opengraph","opengraph-images","screenshots"],"created_at":"2024-10-01T07:58:35.751Z","updated_at":"2025-04-14T23:13:02.426Z","avatar_url":"https://github.com/nicnocquee.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# og-screenshots [BETA]\n\nA CLI to take screenshots of websites and generate [open graph images](https://ogp.me) 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.\n\n## Why?\n\n- Existing solutions are expensive and subscription based. You usually only need to take the screenshots once. You don't have to pay for a monthly subscription.\n- Running your own open graph image generator in the cloud is also expensive. If you use a serverless platform, you'll have to pay for the computing power. If you use a self-hosted server, you'll have to pay for storage and bandwidth.\n\n## Features\n\n- Screenshot a single URL\n- Capture screenshots of multiple URLs from a sitemap or RSS feed\n\n## Requirements\n\n- [Chrome browser](https://www.google.com/chrome/)\n- [ImageMagick (convert)](https://formulae.brew.sh/formula/imagemagick)\n- [Node.js 16+](https://nodejs.org/en/)\n\nNotes:\n\n- **Note that I only tested this on macOS.**\n- Chrome is required because I don't want to use [puppeteer](https://pptr.dev). Puppeteer automatically downloads a recent version of Chrome for Testing which can be ~170MB macOS, ~282MB Linux, or ~280MB Windows. That's a lot of bytes for doing just one thing. It turned out that the normal Chrome browser can be used for this task and majority of people already have it installed.\n\n## Install\n\n```bash\nnpm i -g og-screenshots\n```\n\nOr you can also directly execute the command:\n\n```shell\nnpx og-screenshots --url \"https://example.com\"\n```\n\n## CLI\n\n```\n  Usage\n    $ og-screenshots [input]\n\n  Options\n    --url, -u \u003ctype\u003e 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.\n    --transform, -t Transform origin [Default: false]\n    --timeout, -T \u003ctype\u003e Timeout in milliseconds [Default: 60000]\n    --extension, -e \u003ctype\u003e File extension [Default: webp]\n    --concurrency, -c \u003ctype\u003e Concurrency level [Default: 3]\n    --quality, -q \u003ctype\u003e Image quality [Default: 100]\n    --max-screenshots, -m \u003ctype\u003e Maximum number of screenshots [Default: 0]\n    --recommended-size, -r \u003ctype\u003e Recommended image size [Default: {\"width\":1200,\"height\":630}]\n    --output-dir, -o \u003ctype\u003e Output directory [Default: ./public/screenshots]\n    --window-size, -w \u003ctype\u003e Browser window size [Default: 1300,1300]\n    --chrome-path \u003ctype\u003e Path to Chrome [Default: detected Chrome path]\n    --imagemagick-path \u003ctype\u003e Path to ImageMagick [Default: detected ImageMagick path]\n    --overwrite Overwrite existing files [Default: false]. By default, the command will not take screenshots if the output file already exists.\n\n\n  Examples\n    $ og-screenshots --url \"http://example.com\"\n```\n\n## Development\n\nRun\n\n```bash\nnpx tsx source/cli.tsx --url \"https://example.com\"\n```\n\n## Known issues\n\n- Sometimes the process hangs. You can try to kill the process manually. Anyone who knows how to fix this issue is welcome to contribute.\n\n## License\n\nAffero General Public License v3.0\n\n## Contact\n\n[Nico Prananta](https://twitter.com/2co_p)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicnocquee%2Fog-screenshots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicnocquee%2Fog-screenshots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicnocquee%2Fog-screenshots/lists"}