Is there a way to show my s3 images when viewing Media Library?

System Information
  • Strapi Version: 4.0.7
  • Operating System: MacOS 11.6
  • Database: postgresDB
  • Node Version: v14.18.3
  • NPM Version: 6.14.15
  • Yarn Version: N/A

Anyone know if its possible for Media Library to render the images in the UI that have been added to my S3 bucket via the S3 upload plugin? i.e. just like they are rendered in the UI when they are uploaded to the DB.

you can show an error in the console?

how about your search little in docs and forum. you need to edit your middleware in config folder.

module.exports = [
    name: 'strapi::security',
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          'connect-src': ["'self'", 'https:'],
          'img-src': ["'self'", 'data:', 'blob:', ''],
          'media-src': ["'self'", 'data:', 'blob:', ''],
          upgradeInsecureRequests: null,
1 Like

oh cool, appreciate the passive aggressive reply. I did look at the docs, can you see img-src or media-src anywhere on this page? Upload - Strapi Developer Docs

Ill give your suggestion a go

1 Like

maybe there is no info in docs, but in forum:

1. strapi-v4-override-csp
2. Strapi v4 deployed to AWS EBS trying to load resource from localhost
3. Strapi v4 broken image Blob:
4. Error uploading media asset when using S3 storage
5. Strapi v4 broken image, even when the image’s link works (Cloudinary)

1 Like

I am using Strapi v4. I am using S3 which is secured so there won’t be public access. I use a signed URL to access the S3. But the media library cannot be modified to display the preview with the signed URL and the media library cannot be modified so that when we copy the link will be signed.

Is there any way to modify the URL in the media library?

not at the moment, you can make custom plugins and logic inside to modify data in the media library.


Is there any solution by now for this problem, to get the previews & copied links working?