My site uses the core Media module, Entity Embed, and LinkIt to reference media and other entities in various ways.

I want to keep track of which media is embedded on which nodes.

I tried adding an entity reference field to media on my content types, but this means that I have to add the media twice: to the field where I actually embed the media and to the entity reference field to track it.

Is there a better way?


First, there is a core issue to eventually get this into core.

Now, the best way is to use the Entity Usage module, which can handle tracking of media and many other cases.

Hats off to the module maintainers-- this is all I needed to do to implement my use case:

  1. Download the module with composer.
  2. Enable the module.
  3. Go to /admin/config/entity-usage/settings and check Media under Enabled local tasks.
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.