Skip to content
On this page

getMainImageUrl ​

Definition ​

gets the cover image

Signature ​

ts
export function getMainImageUrl<
  T extends
    | {
        cover?: {
          media?: {
            url: string;
          };
        };
      }
    | {
        media?: Array<{
          media?: {
            url?: string;
          };
        }>;
      }
    | {
        cover?: {
          url: string;
        };
      },
>(object: T): string 

Parameters ​

NameTypeDescription
object
T
Object containing media object

Return type ​

ts
string
getMainImageUrl has loaded