Skip to content

Instantly share code, notes, and snippets.

@JohnRSim
Created June 28, 2023 13:15
Show Gist options
  • Save JohnRSim/ac88e30985d3004df4daeb46e338c82c to your computer and use it in GitHub Desktop.
Save JohnRSim/ac88e30985d3004df4daeb46e338c82c to your computer and use it in GitHub Desktop.
Overview on OCM getRenditionURL

get the native rendition URL for this client

contentClient.getRenditionURL({
    id: 'CONTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1'
});

get the Thumbnail rendition URL for an image in JPEG format

contentClient.getRenditionURL({
    id: 'CONTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1',
    type: 'Thumbnail',
    format: 'jpg'
});

get the native rendition URL, to be rendered inline

contentClient.getRenditionURL({
    id: 'CONTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA1',
    download: false
});

get the native rendition URL by slug, to be rendered inline

contentClient.getRenditionURL({
    slug: 'pageBanner,
    download: false
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment