@shoaibmerchant/strapi-provider-upload-imagekit

4.0.4 • Public • Published

strapi-provider-upload-imagekit

version v4.0.2

Notes

ImageKit provider for the Strapi Upload plugin

  • Current version: 4.0.2
  • Compatible with Strapi version: ^4.0.0
    • Latest tested version 4.0.7

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 @shoaibmerchant/strapi-provider-upload-imagekit

Weekly Downloads

1

Version

4.0.4

License

MIT

Unpacked Size

7.02 kB

Total Files

6

Last publish

Collaborators

  • shoaibmerchant