frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: Turn raw HTML into production-ready images for free

https://html2png.dev
57•alvinunreal•6h ago

Comments

eastoeast•5h ago
This is a great idea. I can’t believe I didn’t think of this, given I generate and screenshot so many “poster images” in html just like this. Haven’t played around a ton but seems intuitive. Nice work!
xiaohanyu•5h ago
Maybe webp is a better target than png?
dtagames•4h ago
It's not. JPG, I could live with but please not webp.
Mogzol•2h ago
Why? I assume the intention is to show these images on a webpage somewhere. WebP is well-supported by browsers and can store lossless images at better compression ratios than PNG, so why not use it? I don't think using a lossy format like JPEG makes much sense. JPEG is a fine format for photos, but for HTML content rendered as an image I assume most people would want a lossless format so you don't get artifacts.
kaizenb•2h ago
Definitely should be WebP.
benatkin•4h ago
No, because their domain is png /s

I thought webp would be better for this and checked again just to be sure, and yes, it would be better for this. WebP is quite well supported, albeit not as well supported as png, and it can have significantly smaller file sizes for the same lossless image as png.

RyanShook•4h ago
Nice! It definitely makes you wonder when is MCP actually needed vs just giving the LLM API calls to work with.
chevman•4h ago
Any similar AI based services/agents that can take images/creative assets (eg Figma, Sketch, Adobe PS, etc files) and create production-ready emails and landing pages in HTML?
geooff_•3h ago
Very cool. Is there an option to self-host? This seems like it could be a cool agent skill.
threeducks•50m ago
HTML to PNG:

    chromium --headless --disable-gpu --screenshot=output.png --window-size=1920,1080 --hide-scrollbars index.html
Also works great for HTML to PDF:

    chromium --headless --disable-gpu --no-pdf-header-footer --run-all-compositor-stages-before-draw --print-to-pdf=output.pdf index.html
Retr0id•3h ago
What differentiates production-ready images from regular images?
apeters•2h ago
They are cloud-native, of course.
RadiozRadioz•2h ago
They're bedazzled by a little bit of marketing flair.

Generally I find production-ready images have more synergy and tend to be web-scale. Often they're built from the ground up for AI & are blazing fast, at scale, and empower your team whilst unlocking new possibilities. As my sibling comment suggests, being cloud-native is a crucial factor too.

4ndrewl•17m ago
Downvoted for not starting with "Great question!" /s
back2reddit•9m ago
It's not an image—it's an image on the edge.

No cruft. No legacy formats.

Just buttery smooth production readiness.

tbrownaw•3h ago
Playwright behind a web server?
oefrha•2h ago
I’m afraid out of all the waiting strategies available in Puppeteer/Playwright, waiting a fixed period is the worst possible. Maybe consider exposing the proper waiting strategies, load/domcontentloaded/networkidle, maybe even the more fine-grained ones https://playwright.dev/docs/actionability
Retr0id•2h ago
I did some tests and it didn't seem like a fixed wait, when I kept making network requests the render timed out entirely.
oefrha•1h ago
I made the comment based on the delay parameter (“Wait time in ms.”) in the API. I didn’t test so don’t know what the default behavior is.
jihchi•2h ago
This is cool! One use case is generating a Mermaid diagram as an image. For example, you can use the following HTML[^1]:

  <!doctype html>
  <html lang="en">
    <body>
      <pre class="mermaid">
    graph LR
        A --- B
        B-->C[fa:fa-ban forbidden]
        B-->D(fa:fa-spinner);
      </pre>
      <script type="module">
        import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@11/dist/mermaid.esm.min.mjs';
      </script>
    </body>
  </html>
Then html2png.dev will serve you:

  https://html2png.dev/api/blob/oTVGhhCc6rDZYQFDIE3EGkcKs-KO6J9-_DHs-jO2OJc-d23fb4f2.png
[^1]: https://mermaid.js.org/config/usage.html#simple-full-example
JimDabell•1h ago
Why wouldn’t you just use Mermaid to generate the PNG directly?
Garlef•1h ago
One reason I could think of: Fewer dependencies that need integration
reassess_blind•1h ago
I thought this was satire. Usually you want to go from image to HTML, not the other way around. I suppose it does have its uses, though.
devmor•1h ago
It certainly does, that's why it's been a common dev tool for a bit over 20 years. I'm not really sure what the point of OP making it a web app is, though.
agentifysh•1h ago
that "Not MCP" is so refreshing it makes me laugh out loud

it's literally waht i've been saying all along when I came across mcp "why can't i just give agent a prompt and it will run the rest api calls for me"

there's still some MCPs which makes sense but we have it for literally everything when just a prompt will do the job!

now on the topic of html2png i do wonder is this like the self-hostable version on github https://github.com/maranemil/HTML2Png where they use canvas? or is this something else ?

jumploops•1h ago
Love the simplicity and “Not MCP” callout (:

Not that it matters, but curious what percentage of this service was “vibe-coded”?

Fabrice Bellard Releases MicroQuickJS

https://github.com/bellard/mquickjs/blob/main/README.md
1016•Aissen•15h ago•387 comments

X-ray: a Python library for finding bad redactions in PDF documents

https://github.com/freelawproject/x-ray
386•rendx•10h ago•79 comments

Some Epstein file redactions are being undone with hacks

https://www.theguardian.com/us-news/2025/dec/23/epstein-unredacted-files-social-media
420•vinni2•12h ago•302 comments

Unifi Travel Router

https://blog.ui.com/article/travel-in-style-unifi-style-unifi-travel-router
227•flurdy•8h ago•182 comments

Texas app store age verification law blocked by federal judge

https://www.macrumors.com/2025/12/23/texas-app-store-law-blocked/
218•danso•10h ago•119 comments

Autonomously navigating the real world: lessons from the PG&E outage

https://waymo.com/blog/2025/12/autonomously-navigating-the-real-world
73•scoofy•6h ago•22 comments

CEO killed at industrial site by worker operating forklift

https://www.12onyourside.com/2025/12/23/ceo-killed-industrial-site-by-worker-operating-forklift-w...
15•gehwartzen•2h ago•1 comments

Show HN: Turn raw HTML into production-ready images for free

https://html2png.dev
57•alvinunreal•6h ago•26 comments

Nabokov's guide to foreigners learning Russian

https://twitter.com/haravayin_hogh/status/2003299405907247502
76•flaxxen•7h ago•104 comments

Could lockfiles just be SBOMs?

https://nesbitt.io/2025/12/23/could-lockfiles-just-be-sboms.html
47•zdw•6h ago•23 comments

Custom Cross Compiler with Nix

https://www.hobson.space/posts/nixcross/
14•todsacerdoti•3h ago•0 comments

Lua 5.5

https://lua.org/versions.html#5.5
278•km•1d ago•89 comments

Don't Become the Machine

https://armeet.bearblog.dev/becoming-the-machine/
51•armeet•5h ago•20 comments

Life, Death and Mowing

https://www.cam.ac.uk/stories/lawnmower-poetry
7•timthorn•4d ago•3 comments

Proving Bounds for the Randomized MaxCut Approximation Algorithm in Lean4

https://abhamra.com/blog/randomized-maxcut/
26•todsacerdoti•3d ago•0 comments

Perfect Software – Software for an Audience of One

https://outofdesk.netlify.app/blog/perfect-software
135•ggauravr•4d ago•57 comments

Is Northern Virginia still the least reliable AWS region?

https://statusgator.com/blog/aws-least-reliable-region-in-2025/
89•colinbartlett•9h ago•60 comments

Correspondence Between Don Knuth and Peter van Emde Boas on Priority Deques 1977 [pdf]

https://staff.fnwi.uva.nl/p.vanemdeboas/knuthnote.pdf
31•vismit2000•6h ago•2 comments

Learn Lisp/Fennel Programming Against Neovim

https://github.com/humorless/fennel-fp-neovim
51•veqq•6d ago•5 comments

HTTP Caching, a Refresher

https://danburzo.ro/http-caching-refresher/
101•danburzo•12h ago•15 comments

Interactive Fluid Typography

https://electricmagicfactory.com/articles/interactive-fluid-typography/
42•list•5d ago•8 comments

We replaced H.264 streaming with JPEG screenshots (and it worked better)

https://blog.helix.ml/p/we-mass-deployed-15-year-old-screen
403•quesobob•14h ago•247 comments

Open source USB to GPIB converter (for Test and Measurement instruments)

https://github.com/xyphro/UsbGpib
32•v15w•7h ago•6 comments

What makes you senior

https://terriblesoftware.org/2025/11/25/what-actually-makes-you-senior/
314•mooreds•4d ago•154 comments

'Dracula's Chivito': Hubble reveals largest birthplace of planets ever observed

https://phys.org/news/2025-12-chaotic-dracula-chivito-hubble-reveals.html
41•wglb•6h ago•9 comments

Volvo Centum is Dalton Maag's new typeface for Volvo

https://www.wallpaper.com/design-interiors/corporate-design-branding/volvo-new-font-volvo-centum
81•ohjeez•14h ago•69 comments

Help My c64 caught on fire

https://c0de517e.com/026_c64fire.htm
94•ibobev•13h ago•31 comments

Fifty problems with standard web APIs in 2025

https://zerotrickpony.com/articles/browser-bugs/
112•dhruv3006•6d ago•37 comments

iOS 26.3 brings AirPods-like pairing to third-party devices in EU under DMA

https://www.macrumors.com/2025/12/22/ios-26-3-dma-airpods-pairing/
287•Tomte•1d ago•251 comments

Time-Traveling to 1979: Advice for Designing 'C with Classes

https://coderschmoder.com/i-time-traveled-1979-met-bjarne-stroustrup
11•birdculture•1w ago•8 comments