diff --git a/src/collections/Images/endpoints/getByID.ts b/src/collections/Images/endpoints/getByID.ts index a5c84c5..949f346 100644 --- a/src/collections/Images/endpoints/getByID.ts +++ b/src/collections/Images/endpoints/getByID.ts @@ -94,4 +94,5 @@ export const convertImageToEndpointImage = ({ ], [200, 320, 480, 800, 1280, 1920, 2560] ), + ...(isPayloadImage(sizes?.og) ? { openGraph: sizes.og } : {}), }); diff --git a/src/sdk.ts b/src/sdk.ts index b10f175..fd21f32 100644 --- a/src/sdk.ts +++ b/src/sdk.ts @@ -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 = { diff --git a/src/utils/endpoints.ts b/src/utils/endpoints.ts index 8e88b0b..6e0f4db 100644 --- a/src/utils/endpoints.ts +++ b/src/utils/endpoints.ts @@ -362,4 +362,5 @@ export const convertMediaThumbnailToEndpointMediaThumbnail = ({ ], [200, 320, 480, 800, 1280, 1920, 2560] ), + ...(isPayloadImage(sizes?.og) ? { openGraph: sizes.og } : {}), });