Design Engineering an X Component
Blog post from Resend
We recently added a new component to Broadcasts, our no-code editor. The challenge was embedding dynamic media like Twitter posts into static emails while maintaining the email's integrity and usability. To solve this problem, we used three tools made by Vercel: `ImageResponse` constructor, `ImageResponse` to create images using JSX syntax, and Next.js response to capture rendering and return a JPG. We saved the rendered JPG in a static host (S3 bucket) and embedded it into the email HTML body as an anchor tag directed to the Twitter post. The solution involved several challenges, including sequencing issues with the `ImageResponse` constructor and limitations on CSS styles due to Satori library constraints. Despite these challenges, we were able to create a polished and visually appealing component that enables users to easily embed dynamic media into their emails.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Vector Search | 1 | 4,085 | 286 | 88 | +57% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.