# @shaunpearce/strapi-provider-upload-imagekit

> ImageKit provider for strapi upload

Latest version **0.0.1** (published 2022-07-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @shaunpearce/strapi-provider-upload-imagekit
pnpm add @shaunpearce/strapi-provider-upload-imagekit
yarn add @shaunpearce/strapi-provider-upload-imagekit
bun add @shaunpearce/strapi-provider-upload-imagekit
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2022-07-09 |
| First published | 2022-07-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=12.x.x <=16.x.x |
| Dependencies | 1 |
| Unpacked size | 7.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Denis Šaško |
| Maintainers | shaunpearce |
| Keywords | upload, imagekit, strapi |

## Links

- npm: https://www.npmjs.com/package/@shaunpearce/strapi-provider-upload-imagekit
- Repository: https://github.com/dsasko/strapi-provider-upload-imagekit
- Homepage: https://github.com/dsasko/strapi-provider-upload-imagekit#readme
- Issues: https://github.com/dsasko/strapi-provider-upload-imagekit/issues
- npm.io page: https://npm.io/package/@shaunpearce/strapi-provider-upload-imagekit

## Dependencies (1)

- [imagekit](https://npm.io/package/imagekit.md) ^3.2.3

## Alternatives

- [exif-parser](https://npm.io/package/exif-parser.md) — 3.8M weekly downloads
- [vite-plugin-compression](https://npm.io/package/vite-plugin-compression.md) — 569.5K weekly downloads
- [pica](https://npm.io/package/pica.md) — 442.4K weekly downloads
- [@reportportal/client-javascript](https://npm.io/package/@reportportal/client-javascript.md) — 408.8K weekly downloads
- [@tldraw/state](https://npm.io/package/@tldraw/state.md) — 316.0K weekly downloads

## Recent versions

- 0.0.1 (latest) — 2022-07-09

## README

# strapi-provider-upload-imagekit
![version v4.0.2](https://img.shields.io/badge/Version-4.0.2-956fff "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`

:exclamation: `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.

:exclamation: 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](https://docs.strapi.io/developer-docs/latest/plugins/upload.html#using-a-provider).

**3. Add your configuration**

Example `./config/plugins.js`:

```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`:

```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
- [MIT License](LICENSE.md)

## Links
- [Strapi website](http://strapi.io/)
- [Strapi community on Discord](https://discord.strapi.io/)
- [Strapi news on Twitter](https://twitter.com/strapijs)

## Imagekit links
- [Imagekit node library](https://www.npmjs.com/package/imagekit)
- [Imagekit API Docs](https://docs.imagekit.io/api-reference/api-introduction)

---
_Source: https://npm.io/package/@shaunpearce/strapi-provider-upload-imagekit · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
