Back to Supabase

Taking Screenshots with Puppeteer

apps/docs/content/guides/functions/examples/screenshots.mdx

1.26.04715 B
Original Source
<div class="video-container"> <iframe src="https://www.youtube-nocookie.com/embed/Q1nfnQggR4c" frameBorder="1" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowFullScreen ></iframe> </div>

Puppeteer is a handy tool to programmatically take screenshots and generate PDFs. However, trying to do so in Edge Functions can be challenging due to the size restrictions. Luckily there is a serverless browser offering available that we can connect to via WebSockets.

Find the code on GitHub.