This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
@vercel/og is broken for Astro #7295
Replies: 2 comments
-
This discussion was automatically locked because the community moved to a new site. Please join us at vercel.community |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Page to Investigate
https://www.npmjs.com/package/@vercel/og?activeTab=versions
Steps to Reproduce
Using the @vercel/og package in conjunction with Astro causes issues.
Please find below a description of the problem as well as a proposed solution.
Importing and using
ImageResponse
and building raises the following issue:Which relates to the following lines from
src/index.edge.ts
There seems to be some issue with the fetch call for the fallback font.
Removing the fetch call or inlining the font solves the issue. As can be seen with the commented code above.
I would suggest the following:
Remove usage of
fetch()
by inlining font.This way no more fetch is required and the issue is solved.
Beta Was this translation helpful? Give feedback.
All reactions