this post was submitted on 08 Jul 2026
9 points (100.0% liked)

Programming

27631 readers
211 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 3 years ago
MODERATORS
 

Working on a project where I need to grab screenshots of pages on a schedule — mostly for QA and keeping a visual history of what changed and when.

Right now I'm running Puppeteer in a cron job on a cheap VPS. It works, but honestly it's a pain to maintain. Chromium eats RAM like crazy, sometimes it hangs and the whole thing needs a restart, and the screenshots come out wrong on pages that load content dynamically.

A few things I've been struggling with:

  • Pages with lazy-loaded images — half the time the screenshot fires before everything renders
  • Cookie consent banners blocking the actual content
  • Memory usage goes through the roof when I try to do more than ~50 pages in a batch

I've looked into Playwright as a replacement but from what I can tell the resource usage is about the same. Also tried running headless Chrome in Docker which at least makes cleanup easier, but didn't solve the core problems.

Curious what others are using. Are screenshot APIs worth it for this kind of thing, or is self-hosting still the way to go? Anyone running something similar at scale?

you are viewing a single comment's thread
view the rest of the comments
[–] solrize@lemmy.world 1 points 23 hours ago

I haven't used Puppeteer but have seen similar issues with Selenium and Firefox. Yeah you have to code delays for pages to load, maybe scan the page for text you expect to see, etc. If this is for your own site (I mean where you're working) you can probably do most QA functions by having some special flags that disable the overlays and stuff. Also if you have disk space to burn, instead of screen shots, you can connect the browser frame buffer to ffmpeg and capture video. That can be useful for QA, since if something goes wrong, you can see an actual movie of what was happening.

Yes browsers eat ram, you just have to deal with that.