HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Assets and media

Manage blocks, media files, and other assets through the typed content model in Optimizely CMS.

Assets such as blocks and media files are available from the assets panel in edit view in Optimizely Content Management System (CMS) and Optimizely Commerce Connect. Assets can also be items in the Commerce Connect product catalog. A media type can be an image, a video, or a document in a defined file format.

📘

Note

Define media types in the content model before using built-in asset functionality. File upload and drag-and-drop do not work without a defined media type.

The assets system is based on a typed content model with support for the following property types:

  • ContentReference with UIHint set to image – displays and edits as an image.
  • ContentReference with UIHint set to video – displays and edits as a video.
  • ContentReference with UIHint set to mediafile – displays and edits as any file.
  • Url with UIHint set to image – displays and edits as an image.
  • Url with UIHint set to video – displays and edits as a video.
  • Url with UIHint set to document – displays and edits as any file.

The following functionality is available for all content types, including media:

  • Wastebasket (trash) support – move, view, and restore content from trash.
  • Reference check on delete – a dialog box shows links to affected content references when deleting any content item (image, page, block, and so on).
  • Drag-and-drop support – drag from the media manager in the Assets panel to any overlay or editor that handles files (ContentReference or Url properties with a mediafile, image, or video UIHint).

See Media types and templates for how to define assets and media types for your website.

Related blog post: Image property with media component