Create a rendition task for clipping paths
A clipping path is a technique for creating a vector path using photo-editing software. This lets you remove the background from an image in a non-destructive manner.
If you create a clipping path for a vector file in photo-editing software, you can import that file into Sitecore Content Hub with the clipping path available as a rendition. In order for the rendition to appear in the Entity renditions component, you must configure that component for the corresponding entity definition (such as M.Asset).
There is a variety of ways to create a clipping path; the following procedure uses the example of a path to be used in Adobe Photoshop.
To configure Content Hub, you must either be a superuser or have the necessary permissions granted to you through user group policies.
To create a rendition task for clipping paths:
-
On the menu bar, click Manage .
-
On the Manage page, click Media processing.
-
On the Media processing page, select the Content set, then click Vectors.
-
On the Vectors flow, add a new Convert image task with the following settings:
-
Content type - image/png
-
Content disposition - Inline
-
Resize option - Only shrink if larger. The resize options Only shrink if larger, Only shrink if smaller, and Resize for crop require that you define a width value and a height value.
-
Target extension - png
-
Width (px) - 1600
-
Height (px) - 900
-
Multi-page - Deselected
-
Clipping path - Name for the clipping path in Photoshop, such as OurNewClippingPath The remaining parameters can be configured however you prefer, or ignored if not needed.
-
-
Store the outputs and create a rendition link.
-
Save the task and the processing flow.
-
Click Publish to publish your changes.
For a more detailed explanation of how to create a processing task, see Create processing tasks.
After you create the rendition task, you can create a clipping path in Photoshop using the same name as the Clipping path assigned to the task.
To test the clipping path created in the previous example:
The clipped path should display with the background removed. If you download and open the Original instead, the image displays with the background and not just the clipping path.