Skip to content

Implement Media Asset Management as a first class entity #499

Open

Description

@ormsbee

This feature was originally proposed by @holaontiveros and @rodmgwgu, in a workshop session during the Axim/WGU dev summit in Feb '26, though I'm reframing it somewhat here. All of this is subject to Product approval, of course.

Use Cases

Western Governors University uses a Digital Asset Management System for its various media files. This serves to provide a centralized, searchable repository of such assets, as well as providing a way to remove assets if it becomes necessary for copyright reasons. In their current deployment of Open edX platform, WGU stores nothing in course Files and Uploads, and uses links for all assets.

The goals for this would be:

  1. Create a system that allows for centralized Media asset management in Open edX Platform.
  2. Allow for pluggable integration with external digital asset management systems, where libraries contain local references and metadata, but the actual asset is stored and served via that external system.
  3. Use this foundation to re-platform course Files and Uploads on top of openedx-core, and help to unblock the migration of course data.

Non-goal: We are not trying to grow Open edX Platform to be a first-in-class Digital Asset Management System. We basically want our platform to be good enough for the 80% use case that includes centralized management for copyright reasons, as well as being able to serve assets at scale.

The current state of media files in openedx-core

We currently support the storage of media assets with the media applet in openedx_content. However, the media app is a very low-level system, and only really gives us blob storage. The only place where media assets can be leveraged by end-users is through the components applet, which has models that map a particular component-local path name with a corresponding media file, e.g. static/diagram.webp → Media:

class ComponentVersionMedia(models.Model):
"""
Determines the Content for a given ComponentVersion.
An ComponentVersion may be associated with multiple pieces of binary data.
For instance, a Video ComponentVersion might be associated with multiple
transcripts in different languages.
When Content is associated with an ComponentVersion, it has some local
key that is unique within the the context of that ComponentVersion. This
allows the ComponentVersion to do things like store an image file and
reference it by a "path" key.
Content is immutable and sharable across multiple ComponentVersions.
"""
component_version = models.ForeignKey(ComponentVersion, on_delete=models.CASCADE)
media = models.ForeignKey(Media, on_delete=models.RESTRICT)
# "key" is a reserved word for MySQL, so we're temporarily using the column
# name of "_key" to avoid breaking downstream tooling. A possible
# alternative name for this would be "path", since it's most often used as
# an internal file path. However, we might also want to put special
# identifiers that don't map as cleanly to file paths at some point.
key = key_field(db_column="_key")

(Note: the comments say "Content" here, when they should say "Media"--I missed this in the refactoring.)

High Level Proposal

  1. Create a new assets applet in openedx_content.
  2. Create a new publishable model called Asset.
  3. Design it such that Assets can be backed either by local file storage via the media app, or act as local references to external digital asset management systems.
  4. Use Assets as the basis for course Files and Uploads.
  5. Use Assets as an alternative method of storage for Components that want to store media. An Asset would become a publishing dependency of the Components in which it is used, giving us a similar version vs. side-effect semantics as we currently have with container parents and children.

Open Questions

  1. Would we migrate current component/media associations in libraries to use assets, or allow for both modes?
  2. What sort of access control is practical on the LMS side?
  3. How will namespacing work, e.g. importing multiple courses into the same library without causing collisions?
  4. How are assets addressed? Many DAM systems have the notion of an Asset having multiple files, e.g. different formats, encodings, translations, or sizes of the same logical asset.

Activity

  1. added
    arch
    data model
    on Mar 14, 2026
  2. ormsbee commented on Mar 14, 2026

    @ormsbee
    ContributorAuthor

    @kdmccormick, @bradenmacdonald, @holaontiveros, @rodmgwgu: I wanted to write this up before I forgot about it.

    @holaontiveros, @rodmgwgu: I've modified the terminology so that the publishable thing is an Asset, since this seemed like it'd be more natural. Please let me know if I've missed anything.

  3. changed the title [-]Implement Asset Management as a first class entity[/-] [+]Implement Media Asset Management as a first class entity[/+] on Mar 14, 2026
  4. kdmccormick commented on Mar 16, 2026

    @kdmccormick
    Member

    Would we migrate current component/media associations in libraries to use assets, or allow for both modes?

    Maybe we can phrase this as a few product questions:

    • As a library author, if I upload a file to a component, do I expect it to be available for re-use in other components?
    • As a course author, if I upload a file directly to a component, do I expect it to appear on the Files and Uploads page?
    • As a course author, if I have uploaded a file to Files and Uploads and used it in 1+ components, do I expect to be able to upload a new version of the file and have it reflected in all those components?

    If it's three yeses, then it seems that there is no use case for direct Component-Media mode and we should try to retire it.

    How will namespacing work, e.g. importing multiple courses into the same library without causing collisions?

    prefix every imported asset key with the source course key?

  5. bradenmacdonald commented on Mar 16, 2026

    @bradenmacdonald
    Contributor

    Would we migrate current component/media associations in libraries to use assets, or allow for both modes?

    This actually relates to a still-unsolved product problem in libraries: sometimes authors want to create a Unit in a library but not have the constituent components appear separately in the library. Likewise, create a Subsection without the Units and Components showing up as individual items in the library. But this is not supported by the system today.

    Sometimes, an author may wish to use an image in a Problem without having the image show up as a separate asset. That is the only way permitted in libraries today, while courses are the opposite.

    My suggestion would be:

    1. If a file is uploaded directly into a library, it shows up as a re-usable, independent asset.
    2. If a file is uploaded while editing e.g. a Problem, it is created as an asset but "hidden" from library search/browse by default. (There would be some setting on the asset like "Hide from library listing", as well as a search setting to override this)
    3. Anytime an asset is uploaded that is identical to an existing asset, the system will prompt the user to re-use an existing asset (and mark it non-hidden if not already), rather than creating a separate asset. Creating a separate asset is still possible but strongly discouraged by the UI.

    We basically want our platform to be good enough for the 80% use case that includes centralized management for copyright reasons, as well as being able to serve assets at scale.

    Enabling "free text" tags in the UI (already implemented in the backend) will go a long way to making that work, as you'd then support fields like "Copyright details", "Owner", etc. that users can enter any values they want into for each asset.

  6. kdmccormick commented on Mar 16, 2026

    @kdmccormick
    Member

    (There would be some setting on the asset like "Hide from library listing", as well as a search setting to override this)

    Are you imagining that this setting would be a field on PublishableEntity, allowing us to eventually implement the "non-reusable Container children" use case you described?

  7. bradenmacdonald commented on Mar 16, 2026

    @bradenmacdonald
    Contributor

    @kdmccormick Yeah, I guess so. It also overlaps with the can_stand_alone field that we already partially implemented.

  8. bradenmacdonald commented on Mar 17, 2026

    @bradenmacdonald
    Contributor

    Latest thought: Could it make sense to replace can_stand_alone=BooleanField() with exclusive_owner=ForeignKey(PublishableEntity) ? That way, when something like a .srt file is only valid in the context of another entity (like a Video Component), it's explicitly modelled as such.

    If something "can stand alone", it has exclusive_owner=None and is listed in search results by default.
    If something is "attached" to a Component or only makes sense in the context of its parent container, it has exclusive_owner pointing to that thing.
    If something cannot stand alone but it's parent entity gets deleted, that would now CASCADE or otherwise be very easy to detect, and then either delete the orphaned asset/entity, promote it to stand alone, or show it in a "trash" area.

    Or maybe PublishableEntityVersionDependency is already mostly tracking this, and we just need some way to mark it as "exclusive" or not.

    I haven't thought this through too much, just dumping some ideas here after our call.

  9. ormsbee commented on Mar 17, 2026

    @ormsbee
    ContributorAuthor

    Latest thought: Could it make sense to replace can_stand_alone=BooleanField() with exclusive_owner=ForeignKey(PublishableEntity) ? That way, when something like a .srt file is only valid in the context of another entity (like a Video Component), it's explicitly modelled as such.

    So in some of our discussions around this, the thought was that even if something was marked as not being able to stand alone, it would still be extractable for re-use in another context. The "this doesn't really make sense on its own" flag was more a signal of intent at the time of authorship, but with the idea that someone should still be able to re-use those components in a second unit, regardless of what the original author thought. In that scenario, I think exclusive_owner doesn't quite capture what's going on. (If we made exclusive_owner null upon the first other re-use, that still wouldn't capture the connotation that "this component shouldn't be advertised as being independently reusable".)

    Or maybe PublishableEntityVersionDependency is already mostly tracking this, and we just need some way to mark it as "exclusive" or not.

    PublishableEntityVersionDependency does capture all the dependency relationships, so it should be relatively straightforward to implement "delete this and all its children unless we encounter a child that can stand alone or is a dependency of a draft or published version of something else in the system".

  10. ormsbee commented on Mar 18, 2026

    @ormsbee
    ContributorAuthor

    If it's important to capture "this was the original thing that this component was created as a part of", I think that we'd need to iron out the use case with product and also figure out if the ownership pointer would go to the immediate ancestor or the top level thing that it was created as part of.

  11. ormsbee commented on Mar 18, 2026

    @ormsbee
    ContributorAuthor

    The other thing we'd have to work out is how a Component addresses an Asset. Right now, media files are namespaced to the ComponentVersion, so the component gets to name a given file whatever it wants. If we want full backwards compatibility in some sort of migration, we'd probably extend that convention to fullly versioned Assets as well, i.e. the ComponentVersionAsset mapping would map component-local paths to those Assets.

  12. tonybusa commented on Mar 19, 2026

    @tonybusa

    Linking this product proposal that we wrote as a group when first discussing this idea: openedx/platform-roadmap#504

  13. holaontiveros commented on Mar 19, 2026

    @holaontiveros

    @kdmccormick, @bradenmacdonald, @holaontiveros, @rodmgwgu: I wanted to write this up before I forgot about it.

    @holaontiveros, @rodmgwgu: I've modified the terminology so that the publishable thing is an Asset, since this seemed like it'd be more natural. Please let me know if I've missed anything.

    I do agree, at that point I was just too deep in grasping the structure of the publishable entities and used whatever was semantically enough to convey the idea.

    Thanks for all this write up and getting the conversaiton started

  14. xitij2000 commented on Apr 2, 2026

    @xitij2000
    Contributor

    OpenCraft has recently had to deal with a couple of XBlocks that could benefit from some kind of asset selection mechanism. We were exploring some simple ways of doing this, and decided to make test out a very simple mechanism that would get us a decent experience. I've posted about it on the forums here with a prototype video, but I'll outline it here.

    The mechanism we explored is very simple. XBlocks that need a URL to an asset will open an Asset Selection UI in a popup/tab/iframe. This asset selection screen is just the existing file management page in the authoring MFE but with modifications to make it appropriate as a file picker. When the user selects one or more files and submits the selection, this page will post a message to the parent page (hosting the XBlock) with some details of the selected assets, such as the name, URL etc. The XBlock UI can listen for this message and fill in the details from the returned assets.

    The XBlock can pass in details about its location, file filter, single/multi selection etc. The file picker can associate the uploaded assets with the XBlock when such a mechanism is available.

    Since this integration is over a simple postmessage, it's possible to configure an external asset management system as long as it posts a message with the correct params.

    Would love to hear feedback on this, I'm hoping it doesn't contradict or conflict with the richer asset-management mechanism proposed here. This is pretty easy to implement (the prototype took less than an hour but needs a lot of polish).

  15. Kelketek commented on Apr 6, 2026

    @Kelketek

    @ormsbee Have you had a chance to check out @xitij2000 's comment above? We're curious if this approach is something we could push further, refine, and get upstreamed. It seems like an overall lower lift than is proposed and could be a good stepping stone either way.

  16. ormsbee commented on Apr 8, 2026

    @ormsbee
    ContributorAuthor

    @xitij2000, @Kelketek: I'm honestly not sure how well this would align. This project is not a short term priority for us, and I wrote this up mostly to capture things that were being hashed out in a workshop session before we all forgot them. In this repo, we're mostly trying to figure out the backend. I don't really know how third party integration of Digital Asset Management systems looks like on the frontend. (I know precious little at all about DAM systems in general. I've been watching the occasional YouTube video to try to understand it better.)

  17. Kelketek commented on Apr 8, 2026

    @Kelketek

    @ormsbee If you don't see an obvious conflict, then I'd imagine they probably aren't in conflict or can be refined to be in more alignment later. It is a short term priority for us and WGU, even without the asset management system, because they are using media-heavy XBlocks even when they aren't using their Digital Asset Management system (which they usually do, but they're currently working on a project that for now, doesn't, though will probably move to it eventually.)

    I imagine the path the upload widget uses could be moved or the component changed to render slightly different interfaces depending on whether DAM is enabled or not.

    cc @xitij2000

  18. xitij2000 commented on Apr 8, 2026

    @xitij2000
    Contributor

    @Kelketek I'd imagine that whatever this asset-management system involves it will definitely require changed to the way assets are handled in the course, and how the course file upload page works. In which case the integration in much the same manner.

    If it's okay we can start with this kind of integration for now. It could potentially be done as a plugin, but this would work much better as a core feature, though it could be kept behind feature flag.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    archdata model

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions