Add opengraph version to image

This commit is contained in:
DrMint 2024-05-23 13:24:34 +02:00
parent d5132e9e25
commit cc90b6f593
3 changed files with 4 additions and 0 deletions

View File

@ -94,4 +94,5 @@ export const convertImageToEndpointImage = ({
],
[200, 320, 480, 800, 1280, 1920, 2560]
),
...(isPayloadImage(sizes?.og) ? { openGraph: sizes.og } : {}),
});

View File

@ -415,6 +415,7 @@ export type EndpointImage = EndpointMedia & {
width: number;
height: number;
sizes: PayloadImage[];
openGraph?: PayloadImage;
};
export type EndpointAudio = EndpointMedia & {
@ -445,6 +446,7 @@ export type EndpointVideo = EndpointMedia & {
export type EndpointMediaThumbnail = PayloadImage & {
sizes: PayloadImage[];
openGraph?: PayloadImage;
};
export type PayloadMedia = {

View File

@ -362,4 +362,5 @@ export const convertMediaThumbnailToEndpointMediaThumbnail = ({
],
[200, 320, 480, 800, 1280, 1920, 2560]
),
...(isPayloadImage(sizes?.og) ? { openGraph: sizes.og } : {}),
});