Using external Media Library (DAM/CDN) with Strapi?

Hello,

in my company I have inherited a system that consists of Strapi as a central CMS for various websites and Canto for a Digital Asset Management (DAM). I would not call myself a Strapi expert, which is why I’m reaching out to the Strapi community for my question.

We’re currently living with a pretty hacky solution developed by an external company. This solution kind of duplicates the Canto Media Library into the Strapi Media Library but this currently requires a lot of manual labour. Also it forks the original Upload plugin and replaces a lot of its files, so we do not get any updates without manually merging them into our fork.

We’re currently migrating from v3 to v4 and because the architecture has changed so much, migrating this hacky solution is very tricky for us. So we’re thinking about coming up with better solutions.

One idea would be to use Strapi basically as a client to browse through Canto. We would want to not have a table for assets known to Strapi.

Instead, when a content manager i.e. wants to define a featureImage for an article, we would like to present him/her a dialog where they can browse through the assets stored in Canto, select one and then the selected asset’s ID would be stored in the article.featureImage field.

So much for the context, now my question to you guys:

I do not expect a technical implementation from you, but what would be the key principles that I would have to research to come up with a more precise technical vision?

I have a feeling that the upcoming Custom Fields feature might come in handy, does this sound right?

Or if not, does Strapi v4 allow me to write a custom plugin that contains admin UI code and backend logic which realize my requirements?

Thanks a lot for your help!

1 Like

In case somebody is interested:
We ended up creating a plugin which registers a custom field. Custom fields are currently in beta, but we are not live with v4 yet. When we’re ready to go live, hopefully custom fields will be stable.

2 Likes

Hi @GregorSondermeier ,

We do have the same requirements.
Can you please share how did you get it working, did you still use Strapi assets, or Canto assets.

Thank you.

We ended up creating a plugin with a custom field and completely ignore Strapi’s own Media Library.

The custom field can be used to browse Canto and pick an asset, and the asset is then stored as JSON into the column of the current content type’s table.

There are some caveats to think about when doing this:
The external library we use (Canto) allows manipulating assets. There is a ton of metadata and even the file itself can be changed, all while retaining the original asset’s ID. We use webhooks to inform Strapi when an asset has changed, and then in Strapi search for it across all content types and update it.
Similar things have to be done when deleting an image from the external library which is still linked in Strapi.

It was a lot of work.

Why not use the CDN plugin? Was there some issue with its pattern, for your use case?

Because it’s a different use case. This plugin requires you to upload the images with Strapi to that CDN, so Strapi becomes the central tool to manage all your assets with.

For my company, we already had tons of images in Canto, and these images are mostly managed and accessed without Strapi, only some of them are related from Strapi.