Open Graph images
You can control the preview image rendered when your site is shared on social media, messengers, or apps that support the Open Graph protocol.
- Written by
- Dmytro Krasun
- Updated on
- •
- 12 min read
With more than a decade of experience in software engineering, I share the best practices and solutions you can apply to your problems in the space of headless browsers. You can also find me on Twitter and LinkedIn
You can control the preview image rendered when your site is shared on social media, messengers, or apps that support the Open Graph protocol.
A screenshot API or a screenshot as a service is usually a cloud or a remote server service that provides the ability to render any website, HTML, Markdown, or even PDF by making a request to the service, be it over HTTP, TCP, or any other protocol.
Daily and nightly, I work on improving the quality and performance of ScreenshotOne (your friendly screenshot API) and ensuring I help customers solve their problems and prosper.
See how easy it is to build a website directory with screenshots with Next.js, Tailwind CSS, and Prisma.
When you want to take chat widgets, there are annoying chat widgets that you would love to hide. It is easy to do.
When taking a screenshot, you want to ensure that you take a clean screenshot without cookie banners or cookie consent forms. And in this article, I will share with you how you can do it when using Puppeteer.
Fix the Puppeteer "Execution context was destroyed, most likely because of a navigation" error after click, form submit, redirect, reload, or page.evaluate.
You can take a full page screenshot with Pupeeter by specifying the `fullPage` parameter as true when taking a screenshot. But there is a caveat. If a site has lazy-loaded images, they won't be rendered. Let's examine how to fix the issue and trigger lazy image loading with Puppeteer.
We can consider the screenshot of URL or HTML as a thumbnail, but I write about the thumbnail of a screenshot. How do you take a screenshot within the defined viewport but with different image width and height? Resize!
Puppeteer, by default, supports only four formats for taking screenshots or rendering HTML: PNG, JPEG, WebP, and PDF. But what if you want it to take it in a different format like GIF, JP2, TIFF, AVIF, HEIF, or SVG?
Join me in exploring how to find the ideal wait time or event of when to take the page screenshot with Puppeteer.
In this note, I share how I take website screenshots or render HTML and upload the resulted images or PDF to any S3-compatible storage like Amazon S3, Cloudflare R2, or Backblaze B2.
Exhaustive documentation, ready SDKs, no-code tools, and other automation to help you render website screenshots and outsource all the boring work related to that to us.