Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@vercel/og and next/og: Can't load image: Unsupported image type: unknown #613

Open
shutock opened this issue May 3, 2024 · 0 comments
Open

Comments

@shutock
Copy link

shutock commented May 3, 2024

Bug report

Description / Observed Behavior

issue both with @vercel/og and next/og with an tag.

I want to render an image from public/backgrounds/1.png, so i do:
<img src={ new URL('/backgrounds/1.png', origin).toString() } {...rest} />.

in dev mode everything works as expected, but in production build there is an error:

"Can't load image http://0.0.0.0:3000/backgrounds/1.png: Unsupported image type: unknown."

In the browser link correctly opens with an image.

Expected Behavior

Proper render

Reproduction

https://og-playground.vercel.app/?share=XZFRT4MwEMe_CjmjvhBBXcwkQzO3RWfCnvbgw16AttBZeoS2AiP77rbDmehD07vf_669_G-AHAmFCGaEf-2k5yndCxoPg4s9r6S8KHXkXd-G4eW1P8KWE13-Y4SrWqS9pUzQ7kxdvOQNzTVHabUchankWU0FL-Ra00o5iUpNm7O0N0pz1i_QQun-_ytnaf5ZNGgkWaDAxuoXjLFRPR538skFM14VY7lq8njYQal1raIgMNLNqsqbHKugLlGjCoyZqIVZqbt8HRBspcCUPPOOkzi5b7tkP79ny5dp8tGV2Ws3TbbvU_bW2dP29nSbwyrcHJJus00ObH7FsMlprBtDr9r4YRLuwM7061w8WPQDRn_j4fFhJIGdfBbYVdgbfMDaGacgGuDUCtE0DH0YuyCauITQzBQQsVQo6gOtcM-3fe1WqttTZt9h1sdVlVECkZvq6INOM1tRUiGwxUYQOH4D

Additional Context

i've got output: "standalone" in next config

next: 14.2.3
@vercel/og: 0.6.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant