StrapiMediaStore with S3


I’m using Tina CMS with a Strapi backend and configured Strapi to use a S3 bucket for media/upload.

The Tina CMS Media Manager is not showing my images uploaded corectly, regardless of using the Strapi UI order the Tina Media manager to upload.

In both cases of uploading, the url prop of the items getting from /upload/files are absolute URL’s to the S3 bucket. The Strapi Media Manager interface ist adding the Strapi URL before the image/item URL so it add a source to the like this: [strapiUrl][item.url]

I found a comment here where it says, that only the local provider is using relative URLs for images. That would mean, this problem exist with all other media provider from strapi.

I’m looking for a way to solve this issue, any ideas?


Yeah it looks like the previewSrc on the strapi media store hard codes that strapi URL into the return path for image previews.

To get around this, you could make your own custom media store that extends the strapi media store and overrides the previewSrc method to construct the path you need. Here is a demo example of a custom store extending the git media store that should be a good reference for what you need to do.

thanks - that sound like a good way, I will try this way :slight_smile:

1 Like