AEM CQ5 Tutorials AEM CQ5 Tutorials

Show Navigation Hide Navigation
  • Home
  • Tutorials
    • AEM/CQ5 Tutorials
    • AEM Forms
  • Interview Questions
    • AEM/CQ5 Interview Questions
  • AEM Test Series
  • Contribute us

Asset Metadata AEM : Comprehensive Guide

Ankur Ahlawat January 15, 2018 Adobe AEM/CQ5 Tutorials, Tutorials

Asset metadata refers to extra data associated with assets that we upload in aem, which is used to describe an asset in more details. During migration the biggest challenge that a developer face is to migrate millions of asset with its associated metadata in aem.

In this tutorial we will see :-

  • What do you mean by metadata in aem.
  • What is the difference between Metadata Profiles and Metadata Schema.
  • Metadata Profiles in AEM.
  • Metadata Schema in AEM.

Asset metadata in aem:-


When ever we upload an asset (image, pdf, video, document etc..) in aem, aem runs its default workflow “Dam Update Asset” to create metadata for this asset and stores metadata in the form of properties on metadata node.

dam-update-asset-metadata-processor

For example:- Lets upload an asset in aemcq5tutorials folder. Then Dam Update Asset workflow will be triggered and its metadata will be stored under /content/dam/aemcq5tutorials/jcr:content/metadata .

metadata-asset-aem

Difference between Metadata Profiles and Metadata Schema in aem:-


Metadata Profiles are used if you have to apply default metadata value to assets within a folder. Means any asset that you subsequently upload to the folder inherits the default metadata that you configured in the Metadata Profile.

Metadata Schema is basically the properties of an asset that you see, it defines what  metadata properties displayed for assets that use the particular schema. Means if you want to display any custom property then you definitely need to use custom metadata schema.

Metadata Profiles in AEM:-


AEM 6.2 onward, the location where Metadata Profiles are stored in the repository has changed. Upon upgrading, they are moved from their location in AEM 6.1 at :

  • /apps/dam/ingestion/profiles/metadata

to a new location under:

  • /conf/global/settings/dam/adminui-extension/metadataprofile

Because of this if you are planning to upgrade from AEM 6.2 to AEM 6.3 you might need to do manual adjustments.

Create Metadata Profile in AEM:-
  • Login to AEM author Instance.
  • Navigate to Tools-> Assets-> Metadata Profiles
    metadata-profile-aem
  • Click Create and Enter title for your custom Metadata Profile.(For Ex:- Sample Profile)
    aem-assets-metadata-profiles
  • Metadata profile Edit form will be displayed.
  • You can create a custom property or configure any existing property over here. Let’s add default value to description property.
  • Select description property and add Default value to it.
    edit-metadata-profile-aem-asset

    • Map to Property: The value of this property provides the relative path/name to the asset node where it is saved in the repository. The value should always start with “./” because it indicates that the path is under the asset’s node.
  • Click Save.

After Saving your metadata profile, it will be save under /conf/global/settings/dam/adminui-extension/metadataprofile/sample-profile.

metadata-profile-crx-value

That’s it you have configured metadata profile. Let’s Apply it to a Folder.

Applying Metadata Profiles to a Folder:-

When you assign a metadata profile to a folder, any sub-folders automatically inherit the profile from its parent folder. This means that you can assign only one metadata profile to a folder. As such, consider carefully the folder structure of where you upload, store, use, and archive assets.

If you assigned a different metadata profile to a folder, the new profile overrides the previous profile. The previously existing folder assets remain unchanged. The new profile is applied on the assets that are added to the folder later.

There are two ways to assign Metadata Profile to a Folder:-

  • Navigate to Folder –> Properties –> Metadata Profiles
    apply-metadata-folder-properties
  • Navigate to Tools –> Assets –> Metadata Profiles –> Select the metadata profile that you want to apply to a folder or multiple folders.
    metadata-profiles-apply-folder

Note: If you update metadata profile, the existing assets can’t get updated with new metadata profile until we run “Dam Update Asset” workflow on them.

For More Details about configuring Metadata Profile click here 

Metadata Schema in AEM:-


As stated earlier metadata schema is used to defines the layout of the properties page and the metadata properties displayed for assets that use the particular schema. You can use the Metadata Schema Forms editor to modify existing schema or add custom metadata schema.

Create a custom metadata schema form:-

To create a custom metadata schema form, it is advised to copy an existing schema. It will save time for adding existing properties.

  • Navigate to Tools –> Assets –> Metadata Schema
    metadata-schema-aem
  • Select any existing metadata schema form, that you want to extend. You can create a blank metadata form also, if you don’t want to reuse exiting forms.
  • Click Copy. Enter name for new metadata schema.
    create-metadata-schema
  • Your new custom metadata schema form is created. You can edit it to add more custom properties.
  • Lets add one text field to it.
    • Form Right side Panel Drag and drop Single Line Text component on Form.
    • Select the newly dropped component.
    • Edit the component and add a Title, placeholder text as shown.
    • Edit Map to Property from ./jcr:content/metadata/default to your property name that you want to map against it.
      Note:- Map to Property specifies the relative path/name to the asset node where it is saved in the CRX repository. It starts with “./” because indicating that the path is under the asset’s node.
    • Click Save.
      custom-metadata-schema-editor
  • Apply this metadata schema to a folder.
  • Select custom metadata schema from Tools –> Assets –> Metadata Schema.
    apply-metadata-schema-forms
  • Select Apply to Folder and select Folder on which you want to apply.
    apply-metadata-schema-aem

That’s it you are done you have successfully applied custom metadata schema to your asset folder. You can check it by select properties of any asset under aemcq5tutorials folder.

test-custom-metadata-schema

For more information on metadata schema refer Adobe Docs here.

You can also create metadata schema based on MIME type of asset. For more information read Metadata schema form for custom MIME type

AEMAsCloud Metadata Schema Quick Fixes:-

Issue 1 :- Not able to add more than 150+ fields in AEM Asset metadata schema in AEMAsCloud environment.

Recently I have faced one issue, where i need to add 200+ metadata fields to a schema with lot of dropdown, but after adding more that 150 fields and clicking on Save button, it is not adding the fields to metadata schema.

Strange part was that the network call that goes for saving the metadata schema, that is showing 200 response and in logs also we are not seeing any error.

After spending good amount of efforts , we figured out that when we click on save button all the fields as going as parameters to the AEM API call and because we have too many drop downs and with each dropdown having multiple values, each value is going as a separate parameter in request due to which we have hit the default limit set by as 10000. By default Max File Count limit & Sling Default Max Parameters is set as 10000 in Apache Sling Request Parameter Handling.
So, in order to fix this issue we updated Max File Count limit value from 10000 to 100000 (You can increase it to 20k also as per your requirements) & Sling Default Max Parameters field value from 10000 to 20000 in org.apache.sling.engine.parameters sling OSGI config, also known as Apache Sling Request Parameter Handling as shown below :-

Apache Sling Request Parameter Handling

Apache Sling Request Parameter Handling configuration

This configuration also resolves, issue related with character encoding and Max post parameters.

For example:-  If you are using AEM sites and passing parameters to AEM servlet and want to change the character default encoding then it can be achieved by updating Default Parameter Encoding property in this configuration.

Related

Spread the love
     
AEM 6.3 AEM Basics Asset Metadata Metadata Profile Metadata Schema

Written by Ankur Ahlawat

I’m a AEM 6 Certified Lead Developer having 9+ years of industry experience and an active member of AEM community. Want to work together to help AEM community ? I’d love to hear from you. Just drop a mail at [email protected]

7 Responses to "Asset Metadata AEM : Comprehensive Guide"

  1. Simon Brown says:
    January 23, 2018 at 3:56 pm

    When I create or edit a schema. The author level role looses acces to see the properties on an asset. The console comes up blank as if the permissions have changed. Admins can see the properties console for an asset as expected Do you have any Idea what may be causing this in AEM 6.1?

    Reply
  2. SRK says:
    April 10, 2018 at 5:18 pm

    Thank you for the article. Can you please clarify below questions.

    1. Is there any way we can extend default schema instead of copying and adding our own properties so that in future we don’t have to copy the new changes from the future releases?

    2. If we customize default scehma, i can see large set of nodes are added under /conf/global/settings/dam/adminui-extension/metadataschema folder. I know we need to add this /conf/global/settings/dam/adminui-extension/metadataschema folder path to our project to deploy in each environment. Is there any best practice around it ?

    Reply
    1. Ankur Ahlawat says:
      April 12, 2018 at 3:45 pm

      1) Currently we don’t have any option to extend a schema, the only option is copying it.
      2) From AEM 6.4 all the configurations are moved to /conf , as per my understanding right now we have only this option.

      Reply
      1. SRK says:
        April 17, 2018 at 4:02 pm

        Thank you for the confirmation !

        Reply
  3. Heema Gupta says:
    April 21, 2020 at 8:09 am

    Hi Ankur,

    Can we create different metadata schemas for Word Doc or Excel file? Like we have one for PDF? I checked for the mime-types, but it handles more of images (png) formats. I’d like to know more about the documents.

    Reply
  4. Anirudh Joshi says:
    March 9, 2022 at 8:03 pm

    Ankur,
    What happens when we do an upgrade? Are the changes over written,Is the content tagged with custom properties lost etc? We are currently doing a fresh AEM install and planning to extend/create custom metadata for Assets but wanted to know how future upgrades and patch impact customizations

    Thanks
    Ani

    Reply
  5. Akhil Raj says:
    April 26, 2022 at 8:09 am

    in 6.3 Classic UI, we have dialogfieldset in asset customization, How we can achieve the same in TOUCH UI?

    After upgrade, it is breaking in classic and not present in Touc

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Subscribe to AEM CQ5 Newsletter

RSS Recent Posts

  • Integrate AEM with Azure Storage SDK May 13, 2025 Ankur Ahlawat
  • Implement Metadata Driven Permissions in AEM December 3, 2024 Ankur Ahlawat
  • HTTP ERROR 404 Not Found – CRX/DE Not available September 24, 2024 Ankur Ahlawat
  • AEM Asset View : Bulk Import Assets using Azure September 9, 2024 Ankur Ahlawat
  • AEM Performance Testing Using Jmeter July 30, 2024 Ankur Ahlawat
  • Create Service User in AEM As Cloud Service April 29, 2024 Ankur Ahlawat
  • Tail logs on AEM As Cloud Service February 21, 2024 Ankur Ahlawat

Popular Tags

Adobe AEM AEM 6.1 AEM 6.3 AEM 6.4 AEM 6.5 AEM 6.x AEMAsCloud AEM Basics AEM Clientlibs AEM CQ5 Tutorials AEM Indexing AEM Plugin Asset Metadata Best Practices Cloud Service Component ContextHub core components CQ5 Custom Component enable cors aem Error Handler HTL Installation Integration Interview Questions Maven Multifield Nested Multifield OSGI OSGI Bundles OSGI Configuration OSGI Services Overlay Core Component personalization Progressive Web Apps Proxy Components Query Performance Sightly Sling TarMK Template Touch UI User Permission

Trending Posts

Adobe Dumps
AEM Interview Questions
Sightly New Features
Create Website in AEM

Pages

  • About Us
  • AEM Discussion
  • Ask Question
  • Contribute us
  • Privacy Policy
  • Search
  • Terms and Conditions

RSS feed RSS - Posts

RSS feed RSS - Comments

© AEM CQ5 Tutorials | 2025 ALL RIGHTS RESERVED

Powered by Pinboard Theme and WordPress

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Cookie settingsACCEPT
Privacy & Cookies Policy

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these cookies, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may have an effect on your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. This category only includes cookies that ensures basic functionalities and security features of the website. These cookies do not store any personal information.
Non-necessary
Any cookies that may not be particularly necessary for the website to function and is used specifically to collect user personal data via analytics, ads, other embedded contents are termed as non-necessary cookies. It is mandatory to procure user consent prior to running these cookies on your website.
SAVE & ACCEPT