1.0.0-rc.0 • Published 8 months ago

strapi-provider-upload-tinify v1.0.0-rc.0

Weekly downloads
-
License
-
Repository
-
Last release
8 months ago

Strapi upload provider to minify images using the Tinify API

The Tinify API minifies PNG, JPEG and WebP images. This upload provider passes uploaded images through this API and then uses an underlying provider (such as S3) to store the result. Tinify does not store the images.

Supported Strapi versions

  • v4.x.x

Installation

npm install strapi-provider-upload-tinify

or

yarn add strapi-provider-upload-tinify

Request an API key at https://tinypng.com/developers.

Add the following to your config/plugins.js or config/plugins.ts file. Move existing provider options to the upstream property of the tinify configuration.

  upload: {
    config: {
      provider: 'strapi-provider-upload-tinify',
      providerOptions: {
        apiKey: 'YOUR API KEY',
        upstream: {
          provider: 'aws-s3',
          providerOptions: {
            s3Options: {
              credentials: {
                accessKeyId: env('AWS_USERNAME'),
                secretAccessKey: env('AWS_PASSWORD'),
              },
              params: {
                Bucket: env('AWS_S3BUCKET'),
              },
            }
          }
        },
      },
    }
  },
1.0.0-rc.0

8 months ago

0.5.2

9 months ago

0.5.1

9 months ago

0.5.0

9 months ago