Sharing in case anyone isn't familiar with this built-in capability: google-chrome --headless --screenshot=my_screenshot.png https://www.example.com
This is for the dozen or so people that don't have Chrome installed.
Show HN: Turn raw HTML into production-ready images for free
71–80 of 87 posts
Re: Show HN: Turn raw HTML into production-ready images for free
#72Re: Show HN: Turn raw HTML into production-ready images for free
#73Congrats on launching, beautiful design. I'm not sure of what "production ready" is supposed to mean here, but the demo image is not optimized, `optipng` command decreases its size by 53.21%.
Given this text at the bottom:
> The high-performance HTML to PNG engine. Built for developers, agents, and automation. Completely free to use. All generated assets are public and ephemeral.
...I assume the implications are that:
1. this service will scale to meet request load without QoS degradation (i.e. it's probably running on FaaS infra), rather than being a fixed-size slowly-elastic cluster that would get choked out if your downstream service got popular and flooded it with thousands of concurrent requests
2. you can directly take the URLs the service spits out, and serve them to your downstream service's clients, without worrying much about deliverability, because there's an object store + edge CDN involved.
In other words, it's not just a single headless-chromium instance running on a box somewhere; you could actually use this thing as an upstream dependency and rely on it.
> the demo image is not optimized, `optipng` command decreases its size by 53.21%
Given that the author's imagined use-case is giving non-multimodal LLMs a way to emit visuals (the prompt at the bottom of the page starts "When asked to create visuals, charts, or mockups"), I think their idea is that the resulting rendered images would more-likely-than-not only be requested once, immediately, to display the result to the same user who caused the prompt to be evaluated.
Where, in that case, the metric of concern isn't "time+bytes cost for each marginal fetch of the resulting image from the CDN"; but rather "end-to-end wall-clock time required to load the HTML in the headless browser, bake the image, push it to the object store, and serve it once to the requesting user."
OptiPNG would slightly lower that last "serve it once" cost, but massively inflate the "bake the image" time, making it not worth it.
(I suppose they could add image optimization as something you could turn on — but "image optimization at the edge" is already a commodity product you can get from numerous vendors, e.g. Cloudflare.)
Re: Show HN: Turn raw HTML into production-ready images for free
#74Earlier quoted context omitted.
This is for the dozen or so people that don't have Chrome installed.
I personally haven't had Chrome installed anywhere in years. I think there are more than a dozen of us!
Re: Show HN: Turn raw HTML into production-ready images for free
#75I created an svg to png API to generate open graph images a while back. It works pretty well and can be hosted on Cloudflare Workers for free.
Re: Show HN: Turn raw HTML into production-ready images for free
#76What differentiates production-ready images from regular images?
Re: Show HN: Turn raw HTML into production-ready images for free
#77Sharing in case anyone isn't familiar with this built-in capability: google-chrome --headless --screenshot=my_screenshot.png https://www.example.com
Re: Show HN: Turn raw HTML into production-ready images for free
#78Sharing in case anyone isn't familiar with this built-in capability: google-chrome --headless --screenshot=my_screenshot.png https://www.example.com
This is for the dozen or so people that don't have Chrome installed.
So it's installed now but still un-personalized like it was installed 5 minutes ago. I don't use it except with Antigravity.
Re: Show HN: Turn raw HTML into production-ready images for free
#79Sharing in case anyone isn't familiar with this built-in capability: google-chrome --headless --screenshot=my_screenshot.png https://www.example.com
Works fine.
Re: Show HN: Turn raw HTML into production-ready images for free
#80Sharing in case anyone isn't familiar with this built-in capability: google-chrome --headless --screenshot=my_screenshot.png https://www.example.com