Skip to main content

Asset Viewer

An Asset Viewer extension makes it possible for users to augment assets with extra information or functionality.

Declare in Manifest

The first thing to do when adding an extension is to define it in the manifest.json file:

"assetViewerExtensions": [
{
"extensionKey": "augment-asset",
"name": "My Asset Viewer Extension",
"description": "An app that augments assets with additional information.",
"icon": "asset-viewer-icon.png",
"resources": {
"folder": "asset-viewer-extension"
}
}
]

In this example, the following properties are defined:

PropertyDescription
extensionKeyUnique identifier for the extension.
nameDescriptive name of the extension.
descriptionBrief overview of the extension's functionality.
iconIcon representing the extension. For optimal rendering in the Asset Viewer sidebar, we recommend your icon be 48x48 pixels.
resourcesLocation of resources associated with the extension.

Required Files

The source code of your Asset Viewer extension lives in the resources folder that you defined in the manifest. This folder contains all of the files (JS, CS, images, etc.) of your extension. In particular, one main file:

  • index.html - This is the entry point of your Asset viewer extension.

Query Parameters

The following query parameters will be appended to the URL of the extension:

  • assetId
  • assetSlug
  • assetName

You can access them in your code like this:

new URLSearchParams(window.location.search).get('assetId');