Have you ever wondered or had a use case where you want to display watermarked images when you to create a public link in Sitecore Content Hub? If so, read this blog post on how you achieve that.
If you are new to watermarking, you can find more information on this Sitecore documentation page Watermarking | Sitecore Documentation.
Essentially, it is a text or image laid over an asset to prevent its unauthorized use. You would have seen watermarked images when you visit sites like Shutterfly where you'd need to pay to obtain the original version of the image for usage.
Here are the steps to accomplish it:
Setup a new user group in Sitecore Content Hub for watermark permissions
Below are the steps in case you need to know how to setup a new user group:
- On the menu bar, click Manage icon
- On the Manage page, click Users
- On the User groups tab, click Add user group
- In the Name field, enter a name for the new user group (for example, Demo.WaterMark)
- To add the required modules, next to Modules, click Add +
- In the Modules dialog, select Media, Content, Product, click OK and then click Save
- Click Policies and setup the permissions like in the screenshot above.
Make sure that you check "CreatePublicLinks" and "ReadPublicLinks" and NOT check "ViewNotWatermarked" permissions.
Add the watermark user group to the user
- Navigate to Manage -> Users page
- Click on the View details icon and click Edit
- Add the watermark user group created above and M.Builtin.Readers user group like in the screenshot below
- Click Save
M.Builtin.Readers user group is needed to access Asset Details page.
Login as the new user
Login as the new user and navigate to Asset Search page. Click on any asset and go to the asset details page. You'd see watermarked image in the generated screenshot and also when you create a public link window
Please note that certain renditions (like original) are not available in the Rendition dropdown of the Create Public Link window and also in the available renditions as this is due to the watermark restrictions setup on those renditions.
Comments
Post a Comment