Sitecore Content Hub DAM: Building a Lightweight WebP Search Card Rendition via Media Matrix
Unlocking Hidden Media Matrix Properties
In an enterprise DAM, the search results grid is where users spend most of their time. When creative teams or brand managers search across thousands of packaging shots, campaign visuals, or product variants, they need to read small label details and tell near-identical assets apart without opening every single asset detail page.
Out of the box, Sitecore Content Hub gives you two extremes for grid views: a tiny thumbnail (typically 150 × 150 px) that looks blurry on modern displays, or the full preview (1100 × 1100 px) that loads megabytes of unnecessary payload across a 50-card search grid. The obvious fix is an intermediate, web-optimized rendition—a 480 × 480 WebP file called cardpreview.
You can scaffold 90% of this rendition directly in the Media Processing UI. However, two critical image-processing settings—raw ImageMagick flags ("conversionparameters": "-strip -quality 80") and alpha-channel preservation ("keepbackgroundtransparency": true)—are not exposed in the UI. The cleanest, lowest-risk way to implement this is a hybrid workflow: let Content Hub generate the cardpreview task and output rendition scaffolding from the UI first, then export the Media Matrix package, append those two properties to each generated cardpreview task in JSON, and re-import.
When this pattern applies. Use this approach when you need a dedicated, bandwidth-friendly search card rendition across visual media types (images, vectors, documents, videos) while preserving transparency and stripping EXIF metadata bloat.
Before you modify your tenant. Media Matrix definitions (such as M.MediaMatrix.Content) govern every asset ingestion pipeline in your environment. Always keep an untouched copy of your exported Media Matrix ZIP before editing the JSON, and verify in a lower environment first.
cardpreview WebP rendition (480 × 480 px, sRGB, 72 DPI, derived from preview) in the Content Hub UI so the platform wires up all task dependencies and output definitions automatically. Then export the Media Matrix package, inject "conversionparameters": "-strip -quality 80" and "keepbackgroundtransparency": true into every cardpreview task in M.MediaMatrix.Content.json, re-import the package, and point your Search and Beta asset card components to cardpreview with graceful fallback.
Why the Standard UI Gets You 90% There—and Where It Stops
When you add a rendition task inside Manage → Media processing, the UI handles the structural plumbing for you: it creates the ConvertImage task under flow.tasks, sets "deps": ["preview"], and registers the corresponding entry inside output.renditions.Renditions. Hand-writing all of that from scratch across seven media flows is tedious and error-prone.
What the UI form does not expose are two properties required to keep search cards both sharp and lightweight:
-
"conversionparameters": "-strip -quality 80"— Passes raw ImageMagick command-line flags.-stripremoves embedded EXIF, XMP, and camera metadata (which can easily add 30–80 KB to a small file), while-quality 80tunes WebP compression so fine packaging text stays crisp without ballooning file size. -
"keepbackgroundtransparency": true— Prevents Content Hub’s media engine from flattening transparent backgrounds onto solid white. Without this flag, transparent PNGs, logos, and vector artwork (.ai,.eps,.svg,.psd) lose their alpha channel during conversion.
Architecture: Chaining cardpreview from preview
Rather than rasterizing raw master files (such as multi-gigabyte PSDs, InDesign files, PDFs, or MP4 videos) a second time, we chain cardpreview directly from the already-generated preview rendition.
preview
1100 × 1100 (JPG / PNG)
cardpreview
480 × 480 WebP, sRGB, 72 DPI, -strip -quality 80
cardpreview2. Fallback:
thumbnail / preview
cardpreview from preview standardizes input across all media types and avoids redundant source rasterization.
| Rendition | Max Dimensions | Format & Quality | Primary Role |
|---|---|---|---|
thumbnail |
150 × 150 px | JPG / PNG (72 DPI) | Compact list views and legacy fallback |
cardpreview |
480 × 480 px | WebP, Quality 80, sRGB, stripped metadata | Asset search cards (sharp detail, thumbnail-like weight) |
preview |
1100 × 1100 px | JPG / PNG (72 DPI) | Asset detail page inspection and source for derived renditions |
Step 1: Scaffold the cardpreview Rendition in the UI
Start in the Content Hub UI so the platform generates the valid JSON task and output rendition scaffolding across your media flows:
- Navigate to Manage → Media processing and open your active Media Matrix (typically Content /
M.MediaMatrix.Content). -
For each visual media flow that produces a
previewrendition—Images, Vectors, Documents, Videos, WebPages, Indesign, and Gifs (skip non-visual flows likeArchives,Audio,ColorProfiles, andSubtitles)—add a newConvertImagetask namedcardpreviewwith the following UI settings:- Input / Dependency:
preview - Target extension / Content type:
webp(image/webp) - Resize option:
OnlyShrinkLargerImages(fits within bounds without cropping or enlarging smaller images) - Width × Height:
480×480 - Color profile:
sRGB - Density:
72DPI
- Input / Dependency:
- Save your Media Processing changes.
Step 2: Export the Package and Patch the Two Hidden Properties
Now export the Media Matrix so you can append the two UI-hidden properties to the tasks Content Hub just created:
- Navigate to Manage → Import/Export (or Manage → Packages).
- Export a package containing your Media Matrix configuration (
M.MediaMatrix.Content), download the ZIP, and extractM.MediaMatrix.Content.json. Save an unmodified backup copy first. -
Open
M.MediaMatrix.Content.jsonand search for"cardpreview":inside each flow’sflow.taskssection. Because you created the rendition in the UI in Step 1, the task block and its correspondingoutput.renditions.Renditions.cardpreviewregistration are already in place. -
Add the two highlighted properties (
conversionparametersandkeepbackgroundtransparency) to everyflow.tasks.cardpreviewblock across all visual flows:
"cardpreview": {
"type": "ConvertImage",
"deps": [
"preview"
],
"input": "preview",
"output": "cardpreview",
"outputfileprovider": "local",
"outputproperties": [
"width",
"height"
],
"contenttype": "image/webp",
"contentdisposition": "inline",
"imageresizeoption": "OnlyShrinkLargerImages",
"targetextension": "webp",
"width": 480,
"height": 480,
"colorprofile": "sRGB",
"density": 72,
"conversionparameters": "-strip -quality 80",
"keepbackgroundtransparency": true
}
Wrapping Up
Building a fast, visually sharp search experience in Sitecore Content Hub doesn’t require custom external components or heavy client-side image manipulation. By pairing Content Hub’s UI-driven Media Processing setup with targeted JSON overrides in the exported M.MediaMatrix.Content package, you unlock ImageMagick’s metadata stripping (-strip -quality 80) and alpha transparency preservation (keepbackgroundtransparency) while keeping your rendition pipeline maintainable.
Remember that Media Matrix updates apply automatically to newly uploaded or reprocessed assets, while your Search and Beta card fallback chain keeps legacy assets rendering smoothly until you decide to batch-reprocess historical collections.