This page is about (warning) DAM 2.0+ The way assets are registered and used changed. If you work with (warning) Magnolia 5.2.x or earlier, see Assets app 1.x .

See Digital asset management on how to use the app. The Assets app is installed by the DAM App module.

The Assets app allows you to manage media assets in Magnolia's digital asset management system (DAM).

You can upload original assets into the system, organize them, perform basic image manipulation operations such as cropping. The assets can be used on the website.

   

Configuration

The app is based on the content app framework so its configuration is typical of any content app.

The app is configured at /modules/dam-app/apps/assets.

Node name

 modules

 dam-app

 apps

 assets

Workspace

The Assets app operates on the dam workspace. The dam workspace stores the uploaded original assets and variations created with image operations such as cropping.

Node types

The DAM App module registers a custom mgnl:asset node type. The Assets app operates on nodes of this type and on folders. 

Editing and upload configuration

Icons, thumbnail images, preview images and supported media types are configured in /dam-app/config/editAssetAppConfigurations. The configurations define the supported media types and asset preview configurations for each asset category. For images, the edit configuration is also configured.

Based on the SupportedMediaType related to the Asset, the corresponding EditAssetAppConfiguration is retrieved during the rendering of the detail subapp. Only appropriate actions are displayed and can be executed in the detail subapp. For example, users have the option to open the image editor and edit images, but this is not possible for other media types.

Here's the configuration for images:

Node nameValue

 modules

 

 dam-app

 

 config

 

 editAssetAppConfigurations

 

 imageUploadConfig

 

 previewConfig

 

 iconStyleName

icon-search 

 previewComponentProviderClass

info.magnolia.dam.app.ui.field.configuration.image.ImagePreviewComponentProvider 

 editConfig

 

 iconStyleName

icon-edit

 mediaEditorId

image

 supportedMediaTypes

 

 image

image/*

 thumbnailComponentProviderClass

info.magnolia.dam.app.ui.field.configuration.image.ImageThumbnailComponentProvider 

Nodes and properties:

  • imageUploadConfiguration:
    • previewConfig: Defines the action configuration to execute if a preview of the asset is required. Previews are only configured for images.
      • iconStyleName: icon-search displays search icon below the preview image on the left. The icon opens the image in the lightbox.
      • previewComponentProviderClass: ImagePreviewComponentProvider is the image implementation of the  PreviewComponentProvider interface. This implementation open a OverlayCloser containing an image. 
    • editConfig: Defines the action configuration to call the image editor configured in /modules/ui-mediaeditor/mediaEditors/image.   
      • iconStyleName: icon-edit displays edit icon below the preview image on the right. The icon opens the image image editor.
      • mediaEditorId: Media editor ID.
    • supportedMediaTypes: Media types are configured as a list of String properties that are a representation of the corresponding MediaType (see below).
      • image: By default all image formats are supported.
    • thumbnailComponentProviderClass ImageThumbnailComponentProvider creates a thumbnail image. You can extend this for other media types by installing the Dam Preview module.

Here's an image in the Asset dialog.

For other assets only the supportedMediaTypes and thumbnailComponentProviderClass nodes are configured. They all use the same thumbnail provider class that displays an icon. By default all formats of each media type are supported.

Here are the configurations in /modules/dam-app/config/editAssetAppConfigurations

Node nameValue

 modules

 

 dam-app

 

 config

 

 editAssetAppConfigurations

 

 imageUploadConfig

 

 audioUploadConfig

 

 videoUploadConfig

 

 supportedMediaTypes

 

 video

video/*

 thumbnailComponentProviderClass

info.magnolia.dam.app.ui.field.configuration.icon.IconThumbnailComponentProvider

 flashUploadConfig

 

 applicationUploadConfig

 

 supportedMediaTypes

 

 application

application/*

 thumbnailComponentProviderClass

info.magnolia.dam.app.ui.field.configuration.icon.IconThumbnailComponentProvider

 documentUploadConfig

 

Properties:

  • <upload configuration name>:
    • supportedMediaTypes: Media types are configured as a list of String properties that are a representation of the corresponding MediaType (see below).
      • <media type>: By default all asset formats are supported.
    • thumbnailComponentProviderClass IconThumbnailComponentProvider creates an icon's thumbnail related to the file media type.

Here's a video in the Asset dialog.


MediaTypes in the SuportedMediaTypes node are configured as a list of String properties. These String properties are a representation of the corresponding MediaType:

    String incommingMimeType = "image/pgn";
    // 'image/*' is the string to be put in configuration if the config has to support all images
    MediaType allImage = MediaType.parse("image/*");
    // 'image/Jpeg' is the string to be put in configuration if the config has to support only jpeg
    MediaType onlyJpeg = MediaType.parse("image/jpeg");
    // RETURN TRUE
    boolean isImage = MediaType.parse(incommingMimeType).is(allImage);
    // RETURN FALSE
    boolean isJpeg = MediaType.parse(incommingMimeType).is(onlyJpeg);

Using the app

See Digital asset management on how to use the Assets app to store and use your media files.

#trackbackRdf ($trackbackUtils.getContentIdentifier($page) $page.title $trackbackUtils.getPingUrl($page))