Image file format webm not allowed in media library upload

System Information
  • Strapi Version: “4.10.1”
  • Operating System: “linux”
  • Database: cloudinary for media and azure for data
  • Node Version:
  • NPM Version:
  • Yarn Version:

I am trying to upload webm file to my strapi project and i am getting the following error:

my plugins.js file is set to default configuration that is:
upload: {
config: {
provider: ‘cloudinary’,
providerOptions: {
cloud_name: ‘test’,
api_key: ‘sample’,
api_secret: ‘sample’,
},
actionOptions: {
upload: { folder: ‘strapi’ },
delete: {},
},
},
},

upload is happening via @strapi/provider-upload-cloudinary which is of version 4.10.1

isn’t webm a movie format? The image-format equivalent to it should be WebP, which is superior to jpg and png in every way, so it really should be supported at some point. There is a PR for that, but not yet finished…

1 Like

yaa, instead of mp4 I want to upload webm to my project… what would be the way then?

Hi. You can upgrade Strapi to the latest version following these guides : Migration Guides | Strapi Documentation

module.exports = ({ env }) => ({
  // ...
  upload: {
    config: {
      provider: 'cloudinary',
      providerOptions: {
        cloud_name: env('CLOUDINARY_NAME'),
        api_key: env('CLOUDINARY_KEY'),
        api_secret: env('CLOUDINARY_SECRET'),
      },
      actionOptions: {
        upload: {},
        uploadStream: {},
        delete: {},
      },
    },
  },
  // ...
});

hope it helps. I’m using the file webm located in : https://dl6.webmfiles.org/big-buck-bunny_trailer.webm

Happy christmas :christmas_tree:

@DivyamYadav currently this format is not supported. But you can use Cloudinary. I believe that will work just like @arthurjacquemin showing in the above post.

1 Like

Hey. Check my repository, it work with the default upload plugin (local storage in public/upload folder) and cloudinary (and I think with other providers but I don’t test)
https://github.com/Kazdan1994/strapi-webm-cloudinary

1 Like

Thank you for sharing.

1 Like