Security News
38% of CISOs Fear They’re Not Moving Fast Enough on AI
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
@beroburny/workers-og
Advanced tools
> Using Vercel's [Satori](https://github.com/vercel/satori) engine, and many credits to [`@vercel/og`](https://vercel.com/docs/concepts/functions/edge-functions/og-image-generation) for the inspiration.
Using Vercel's Satori engine, and many credits to
@vercel/og
for the inspiration.
An og:image
(social card) generator that is fast, browser-less (no Puppeteer), and capable of running on the edge.
This package is designed to be used with Cloudflare Workers (but may be used elsewhere), with the simple API inspired by @vercel/og
.
@vercel/og
@vercel/og
is designed to run on Vercel's edge runtime, and workers-og
on Cloudflare Workers.
While satori
(used in both @vercel/og
and workers-og
) accepts React element as the input, workers-og
adds a feature which allows you to write a simple HTML, which will here be parsed into React element-like object.
import { ImageResponse } from "workers-og";
export default {
async fetch(
request: Request,
env: Env,
ctx: ExecutionContext
): Promise<Response> {
const params = new URLSearchParams(new URL(request.url).search);
const title = params.get("title") || "Lorem ipsum";
const html = `
<div style="display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100vh; width: 100vw; font-family: sans-serif; background: #160f29">
<div style="display: flex; width: 100vw; padding: 40px; color: white;">
<h1 style="font-size: 60px; font-weight: 600; margin: 0; font-family: 'Bitter'; font-weight: 500">${title}</h1>
</div>
</div>
`;
return new ImageResponse(html, {
width: 1200,
height: 630,
});
},
};
FAQs
> Using Vercel's [Satori](https://github.com/vercel/satori) engine, and many credits to [`@vercel/og`](https://vercel.com/docs/concepts/functions/edge-functions/og-image-generation) for the inspiration.
The npm package @beroburny/workers-og receives a total of 2 weekly downloads. As such, @beroburny/workers-og popularity was classified as not popular.
We found that @beroburny/workers-og demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.
Security News
Company News
Socket is joining TC54 to help develop standards for software supply chain security, contributing to the evolution of SBOMs, CycloneDX, and Package URL specifications.