Content Hub: How to set custom image-ratio options for cropping

When you create a public link for an image you have some cropping-options, also the custom crop. If you choose this you get a dropdown with preset ratios from which you can choose and crop the image in the format you need. But how can we customize this for our needs?

Continue reading “Content Hub: How to set custom image-ratio options for cropping”

Content Hub: Get public link for asset from Web SDK Client

Today our topic is getting the public link(s) for an asset in the Content Hub via Web SDK Client. Therefore we first need the configuration and client. Keep in mind, that the user you use must be a superuser.

// Your Sitecore Content Hub endpoint to connect to
Uri endpoint = new Uri("https://yourcontenthuburl");

// Enter your credentials here         
OAuthPasswordGrant oauth = new OAuthPasswordGrant         
{             
  ClientId = "yourclientid",             
  ClientSecret = "yourclientsecret",             
  UserName = "yoursuperusername",             
  Password = "youruserpassword"         };         

// Create the Web SDK client         
IWebMClient client = MClientFactory.CreateMClient(endpoint, oauth);         client.TestConnectionAsync().Wait();

Continue reading “Content Hub: Get public link for asset from Web SDK Client”