Public Links

Current version: 3.2

Public links allow users to share assets with external people who do not have permission to download the assets. This functionality provides an unsigned public link to any pre-generated file rendition of an asset. Sitecore Content Hub can auto-generate a publicly accessible link to all the existing renditions of an Asset.

Warning

If the rendition, to which the public link is pointing, no longer exists, the public link is disabled.

Note
  • A transformation or conversion is not possible if the targeted file is bigger than 50 mb.
  • If a user attempts to create a public link on an image of 50mb or larger, then the conversion will be hidden.
  • If the user tries to apply a transformation on an image bigger than 50mb the transformation will be ignored.

Public links can be generated for individual assets or multiple assets.

  • On the Assets page, select the asset or assets to be shared.

  • Select the action icon:

    on the content page select the action icon

  • Click on Create Public Links.

    on create public links icon on menu

  • The Public links creation page opens.

    Public links creation page

  • Click on the calendar icon and select a date for the link to expire on.

    set expiration date for asset in public link

    Note

    The expiration date for the Public Links can be set, but it is not mandatory so if no date is selected here then the link will never expire.

  • The type of Rendition is a mandatory field. Any common rendition of the selected assets can be chosen. The available renditions are shown in the dropdown. Video Assets can be rendered into MP4 format.

    a list of availabe renditions

  • If any Chili templates have been created these are listed as available renditions:

    renditions available including chili template

    Note

    For more information on Chili Publish, please see Chili Publish.

In the New public link page, users need to enter the following information:

GroupPropertyDescription
Link settingsURL pathThe URL path is automatically generated for the new public link. Clicking on the refresh button regenerates a new URL path. Users can manually edit the URL path.
End dateClick on the calendar icon and select a date for the link to expire on. This field is optional. Selecting no value means the public link never expires.
Image settingsRenditionThe type of Rendition is a mandatory field. Any common rendition of the selected assets can be chosen:
  • Low res Preview
  • Thumbnail
  • Original
CropThis parameter defines the cropping option:
  • Don't crop
  • Crop to center
  • Smart crop
  • Custom crop
The cropping options are further explained in the Cropping options section.
Aspect ratioThis option defines the ratio of the width to the height of the asset. This field is only available when the Crop option is set to Custom crop. The possible values include preset aspect ratios for Facebook, Instagram, LinkedIn, Twitter and Youtube.
The Aspect ratio values are further detailed in the Cropping options section.
ResizeThe Resize option defines the height and weight of the asset. When activated, the Height and Width fields are displayed. This field is only available when the Crop option is set to Don't crop or to Custom crop.
WidthThis option defines the width of the asset. This field is only available when the Resize option is activated or when the Crop option is set to Crop to center or to Smart crop.
HeightThis option defines the height of the asset. This field is only available when the Resize option is activated or when the Crop option is set to Crop to center or to Smart crop.

Cropping options

The new public link interface offers various cropping options. The following image provides an overview of the available options.

cropping outputs

The cropping options are:

  • Don't crop: This option keeps the selected rendition and doesn't crop the image.

  • Crop to center: This option positions the crop box to the center of the image. The width and height values specify the dimensions of the crop box.

  • Smart crop: This option searches the image for edges, skin tones and areas of saturated color, and attempts to position the crop box over the most significant feature. The width and height values specify the dimensions of the crop box.

  • Custom crop: This option allows users to manually select the aspect ratio from a list of preset values. It also allows users to resize the image using the width and height values, and to manually adjust the cropping box in the preview panel. Clicking on this icon reverse icon reverses the cropping box dimensions.

    cropping options

    The Custom crop option displays the aspect ratio field, offering the following preset values:

    GroupValues
    CommonFree, 16:9, 2:1, 3:2, 4:3, 5:4, Original, Square.
    FacebookFacebook Cover Photo, Facebook Event Image, Facebook Highlighted Image, Facebook Shared Image.
    InstagramInstagram Photo, Instagram Stories.
    LinkedInLinkedIn Banner Image, LinkedIn Company Cover Image, LinkedIn Company Photos, LinkedIn Hero Photo, LinkedIn Personal Background Image, LinkedIn Shared Image, LinkedIn Shared Link.
    TwitterTwitter Header Photo, Twitter In-Stream Photo.
    YoutubeYouTube Channel Cover Art, YouTube Channel Profile Image.
    Note
    • The dimensions of the new image must always be smaller than the dimensions of the original image.
    • The Aspect ratio values can be customized in Sitecore DAM.
  • The selection of the asset can be kept or cleared, once the Public link has been created. If everything is correct and then proceed to creating the link by clicking on Submit.

    create the link by clicking on the SUBMIT button

  • The Public link creation job is begun. A new page will open showing the job being processed.

    public link creation job displayed

  • Once this job has been completed, each of the selected assets will have a new public link. On the more actions icon on the content page select the action icon public links are listed, along with a count of the existing public links:

    asset now has a public link shown by the icon with count

  • Clicking on the Public link icon will display the public link (the icon shows the count of existing public links for this asset).

    public link URL

  • Click on Copy Link to copy the link.

    click on copy link to copy the link

  • Public links can be also be generated from this Public links option:

    public links option

  • If no Public links exist the new Public link option is displayed:

    the new public link page opened after clicking on public links

    Note
    • The expiration date for the Public Links can be set, but it is not mandatory so the link will never expire.
    • The type of Rendition is a mandatory field. Any common rendition of the selected assets can be selected. The available renditions are shown on the dropdown (as shown above).
  • The Public link is then created.

    public link has been created

Transformations

Sitecore DAM™ supports the SXA responsive image concept in order to improve the integration with external platforms. Therefore, renditions are dynamically resizable by specifying the transformation directly in the public link URL.

Transformations allow Superusers to manage the configuration of preset renditions and to have these presets applied to renditions dynamically. More specifically; Transformations enables renditions, in different dimensions, to be provided to users without the need to regenerate the Public link.

Please note there is a limit on the size of the file that can be transformed, so if the user tries to apply a transformation on an image bigger than 50mb the transformation will be ignored.

The following image lists the Out-of-the-box transformations:

new transformations page

To apply a transformation to an asset, users need to append the Transformation's name to the URL of the public link as a query parameter named 't'. For example, we can apply a transformation called 'Thumbnail' to an asset by appending the value &t=Thumbnail to the public link's URL.

name of transformation appended to URL

Note

Users can access and manage the available transformations in Sitecore DAM™. This action requires Superuser permissions.

Cache

When a public link is called, Sitecore Content Hub uses a caching system to temporarily store the generated files (from conversions and transformations) for further usage.

Note

The cached files are removed after 19 days.

Image merger (3.2.1)

Starting from version 3.2.1, public link transformations allow the chaining of public links to create a layered flat single image. The chaining is performed by using the example formula:

Public-link-URL/api/content/image1?t=transform&b=image2,image3

Note

The t=transform is optional.

In the following example, three renditions are created for a single asset.

The renditions are:

  • Image 1: which is named as Background_1, to be used as a background image.

    generating a public link for the image to be used as a background

  • Image_2: which has original sized rendition that is named as Filter_1, to be used as a filter:

    public link for filter image

  • Image_3: which has an original sized rendition that is named as Product_1 and is to be used as the foreground image:

    public link to be used as the foreground image

These three different publicly linked renditions can then be chained.

  • Open the first public link, e.g., https://Test_Sitecore_Instance.com/api/content/Background_1?

  • Chain the next public link.

    In this example image_2 is prepended with &b=, e.g: https://Test_Sitecore_Instance.com/api/content/image_1?&b=Filter_1

  • Add the final public link can be added.

    In this example image_3 is prepended with a comma , e.g: https://Test_Sitecore_Instance.com/api/content/Background_1?&b=Filter_1,Product_1

the chaining of the public links is shown in the following example

If assets are made with a similar ratio then the power of this layered public links becomes evident. If background image assets and filter images are created with matching ratios, subsequently they can be used as templates. They can act to quickly create controlled interchangeable layered images with assets such as product SKU shots serving as the foreground image:

controlled interchangeable layered images

Warning

The overlay works because .png file formats, with transparent backgrounds, have been used for the filtered image and the product image. If a Public link is chained with a larger public link, without a transparent background, it will cover the earlier chained public link.

larger chained public link overwrites earlier public link

As discussed earlier transformations are possible, and this layering of Public links is no different.

Transformations are added using the t= formula. This transformation is added after the first public link in the chain.

So in this example the chained public links rendered using:

https://sitecore_instance.com/api/public/content/image_1?&b=image_2,image_3

is transformed using &t=w320 to:

https://sitecore_instance.com/api/public/content/image_1?&t=w320&b=image_2,image_3

The chained image is rendered in this size:

For further information on Transformations, please see Transformations.

Warning

Only the first chained public link can be transformed.

Known issues

The Cropping and Transformation functionality may not be available on some Vector image file formats. Some proprietary Vector image file types such as .psd or .ai prevent this functionality from working, with only a choice of rendition being shown:

Vector images may not have Transformation or Conversion functionality

Any image in a layered file format, such as .ai, .psd or .pdn, will not offer Conversion or Transformation functionality in their original format, but will auto-download. However, as Preview and Thumbnail will be rendered in .png, the Conversion or Transformation functionality is then supported.

Do you have some feedback for us?

If you have suggestions for improving this article,