/
githubmirror
/
next.js
Обзор
Документация
Войти
/
githubmirror
/
next.js
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
canary
test/development/experimental-https-server/app/opengraph-image.tsx
34 строки
675 B
Nils Schönwald
fix to use https urls in meta data images when using experimental-https (#80276)
24 июн 2025, 04:23
Не верифицирован
24 июн 2025, 04:23
72cc7db
Код
Авторство
О чём код?
import { ImageResponse } from 'next/og' export const alt = 'Test OpenGraph Image' export const size = { width: 800, height: 600, } export const contentType = 'image/png' export default async function Image() { return new ImageResponse( ( <div style={{ fontSize: 24, background: 'linear-gradient(90deg, #000 0%, #111 100%)', color: 'white', width: '100%', height: '100%', display: 'flex', textAlign: 'center', alignItems: 'center', justifyContent: 'center', }} > OpenGraph Test Image </div> ), { ...size, } ) }