Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 18185

Opengraph-image not uploaded when deploying Next.js 14 app to Heroku

$
0
0

I have a Next.js 14.2 webapp with App router and try to include an open-graph image by exporting static metadata in the rootlayout file:

export const metadata = {  metadataBase: new URL(`${process.env.NEXT_PUBLIC_BASE_URL}`),  title: {    default: "my-title,    template: '%s | my-title'  },  description: "Some description",  twitter: {    card: "summary_large_image"  }};

The opengraph-image is located in the app/ route under the exact name: opengraph-image.png.

It works in development mode on localhost:3000 but when I deploy the app to heroku the image is not showing up.The og-image tag is included in the header:

enter image description here

but when I try to navigate to it heroku says:

There's nothing here, yet.Build something amazing

Any ideas how to fix it?


Viewing all articles
Browse latest Browse all 18185

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>