Turn X Posts into Beautiful Visual Stories with AI Developer mkantwala released iloveposts, an open-source Cloudflare Worker that turns an X post URL into a typeset PNG and a self-contained HTML card, with the design generated by a Workers AI model. The pipeline runs on Cloudflare Durable Objects, a Sandbox container and Browser Rendering, extracting tweet data via the FxTwitter API and validating each rendered card in Chromium before export. Cards come in three formats — x_post at 1600 × 900, x_square at 1200 × 1200 and x_card at 1200 × 628 — with the tweet body set at a minimum of 40px on x_post and motion settling within 2.5 seconds. Beautify your x.com posts with LLM. Paste a tweet link, optionally say how it should look, and get back a typeset image of the tweet sized for X — plus an interactive version with "See more". This repository is iloveposts : a single Cloudflare Worker that serves the landing page and the API, and runs the whole pipeline on Cloudflare — Durable Objects, a Sandbox container and Browser Rendering, with the designer on Workers AI. To run your own copy, see docs/self-hosting.md https://github.com/mkantwala/iloveposts/blob/main/docs/self-hosting.md . iloveposts-demo-embed.mp4 For one tweet URL, a finished card is: - a PNG at the exact size of the chosen X format, ready to post - a self-contained HTML file — fonts, avatar and media inlined, no network access — with a working See more / See less for long tweets - a preview page that scales the card to fit any window The card shows the tweet as a post — the author, "Replying to @…" for a reply, the text, its media, a quoted tweet with its own author, text and picture, then the date and counts — inside a visual world designed for that tweet: a concept, artwork, palette and typography derived from what it says and shows. Every word, name, number and date comes from the tweet itself. The model decides how it looks, never what it says. Every card is one self-contained HTML document. Tick Motion & 3D on the page or send "motion": true and the designer also decides what moves and how — an entrance, depth and tilt, an ambient background, counts that count up — within one rule: motion reinforces the hierarchy, and nothing moves for its own sake. Static cards can use a script too, drawn once on load — Canvas 2D artwork, generated SVG. Native HTML, CSS, Canvas 2D, SVG and JavaScript come first. Two vendored libraries are there when a design genuinely needs them — Three.js for WebGL 3D scenes and GSAP for timelines — built into the sandbox image and inlined into the card, so nothing is ever fetched. Motion settles within 2.5 seconds; the PNG is the settled frame, and the interactive version is the HTML and the preview. Viewers who prefer reduced motion get the card still. | format | Size | Ratio | For | |---|---|---|---| | x post default | 1600 × 900 | 16:9 | an image attached to a post | | x square | 1200 × 1200 | 1:1 | a square post image | | x card | 1200 × 628 | 1.91:1 | a link-preview card summary large image | X shows post images at roughly a third of their size in the timeline, so type is set large: the tweet body is at least 40px on x post , which reads at about the size of a normal tweet on a phone. POST /v1/cards ─► CardJob one Durable Object per card, one alarm per stage extract one GET to the FxTwitter API: the tweet as structured JSON — author, verification, text, date, media, counts, reply and quote — then measured: length, title line, excerpt build the pipeline writes the tweet as semantic HTML from data — every word, count, image and attribute — and the designer a Workers AI model, AGENT MODEL designs it in ONE request: brief, tweet, page and the tweet's pictures in; the complete index.html out — its