Public Links
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.
If the rendition, to which the public link is pointing, no longer exists, the public link is disabled.
- 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:
-
Click on Create Public Links.
-
The Public links creation page opens.
-
Click on the calendar icon and select a date for the link to expire on.
NoteThe 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.
-
If any Chili templates have been created these are listed as available renditions:
NoteFor more information on Chili Publish, please see Chili Publish.
In the New public link page, users need to enter the following information:
Group | Property | Description |
---|---|---|
Link settings | URL path | The 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 date | Click 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 settings | Rendition | The type of Rendition is a mandatory field. Any common rendition of the selected assets can be chosen:
|
Crop | This parameter defines the cropping option:
| |
Aspect ratio | This 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. | |
Resize | The 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. | |
Width | This 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. | |
Height | This 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.
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 reverses the cropping box dimensions.
The Custom crop option displays the aspect ratio field, offering the following preset values:
Group Values Common Free, 16:9, 2:1, 3:2, 4:3, 5:4, Original, Square. Facebook Facebook Cover Photo, Facebook Event Image, Facebook Highlighted Image, Facebook Shared Image. Instagram Instagram Photo, Instagram Stories. LinkedIn LinkedIn Banner Image, LinkedIn Company Cover Image, LinkedIn Company Photos, LinkedIn Hero Photo, LinkedIn Personal Background Image, LinkedIn Shared Image, LinkedIn Shared Link. Twitter Twitter Header Photo, Twitter In-Stream Photo. Youtube YouTube 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.
-
The Public link creation job is begun. A new page will open showing the job being processed.
-
Once this job has been completed, each of the selected assets will have a new public link. On the more actions icon public links are listed, along with a count of the existing public links:
-
Clicking on the Public link icon will display the public link (the icon shows the count of existing public links for this asset).
-
Click on Copy Link to copy the link.
-
Public links can be also be generated from this Public links option:
-
If no Public links exist the new Public link option is displayed:
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.
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:
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.
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.
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
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.
-
Image_2: which has original sized rendition that is named as Filter_1, to be used as a filter:
-
Image_3: which has an original sized rendition that is named as Product_1 and is 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
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:
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.
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.
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:
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.