Skip to content
On this page

getSrcSetForMedia ​

Definition ​

Returns the srcset attribute for the image, for available breakpoints

Signature ​

ts
export function getSrcSetForMedia<
  T extends {
    thumbnails?: Array<{
      width: number;
      url: string;
    }>;
  },
>(media?: T): string 

Parameters ​

NameTypeDescription
media
T
image object

Return type ​

ts
string
getSrcSetForMedia has loaded