Problem/Motivation

Entity Usage does not track Media entities selected through Entity Browser widgets in custom Layout Builder block configuration fields.

This creates two gaps:

  1. Usage Tracking: Media referenced in custom Layout Builder blocks does not appear in Entity Usage reports.
  2. Unused Media Detection: Since these references are not tracked, media assets may be incorrectly identified as unused and accidentally removed.

Steps to reproduce

  1. Create a custom Layout Builder block plugin. 
  2. Add a configuration field that allows selecting a Media entity through Entity Browser. 
  3. Place the custom block on a Layout Builder page. 
  4. Configure the block and select a media asset. 
  5. Save the page. 
  6. Open the selected Media entity and navigate to its Usage page. 
  7. Observe that the Layout Builder page is not listed as a usage. 
  8. Verify that no corresponding usage record is created by Entity Usage.

Proposed resolution

Requirement 1 Add support for tracking Media entity references stored in custom Layout Builder block configuration, including values populated through Entity Browser widgets.

Requirement 2: Provide code logic, an API, or a documented example to identify truly unused media entities, including validation against references stored in custom Layout Builder block configuration, so that unused media can be safely removed.

Comments

naresh g pai created an issue.

alexpott’s picture

@naresh g api can you confirm that you have 'Layout Builder' plugin enabled? You can enable it on admin/config/entity-usage/settings