strapi-provider-upload-imagekit

4.25.0 • Public • Published

strapi-provider-upload-imagekit

ImageKit provider for the Strapi Upload plugin

  • Current version: 4.25.0
  • Compatible with Strapi version: ^4.0.0
    • Latest tested version 4.25.6

MAYOR and MINOR versions of the provider are representing compatability with Strapi, while the PATCH version is used to denote changes in the provider itself.

❗ For Strapi v3 please use v0.2.5 of this provider.

Installation

1. Install via npm or yarn

npm install strapi-provider-upload-imagekit --save

or

yarn add strapi-provider-upload-imagekit

2. Add or modify the plugins configuration file

Global configuration file is located in ./config/plugins.js

Environment configuration files are located in ./config/env/{env}/plugins.js

For more information please check the official documentation.

3. Add your configuration

Example ./config/plugins.js:

module.exports = ({ env }) => ({
  upload: {
    config: {
      provider: "strapi-provider-upload-imagekit",  // Community providers need to have the full package name
      providerOptions: {
        publicKey: "publicKey",
        privateKey: "privateKey",
        urlEndpoint: "urlEndPoint",  // Example: https://ik.imagekit.io/username

        // Optional
        params: {
          folder: "/production/images"  // Defaults to "/" if value is not supplied
        }
      }
    }
  }
});

4. Setting up strapi::security middlewares to prevent contentSecurityPolicy URL blocking

Modify ./config/middleware.js:

// ...
{
    name: 'strapi::security',
    config: {
      contentSecurityPolicy: {
        useDefaults: true,
        directives: {
          'connect-src': ["'self'", 'https:'],
          'img-src': ["'self'", 'data:', 'blob:', 'ik.imagekit.io'],
          'media-src': ["'self'", 'data:', 'blob:', 'ik.imagekit.io'],
          upgradeInsecureRequests: null,
        },
      },
    },
},
// ...

Resources

Links

Imagekit links

Readme

Keywords

Package Sidebar

Install

npm i strapi-provider-upload-imagekit

Weekly Downloads

20

Version

4.25.0

License

MIT

Unpacked Size

7.74 kB

Total Files

6

Last publish

Collaborators

  • dsasko