npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@lussoadv/payloadcms-storage-imagekit

v1.0.9

Published

ImageKit storage adapter for Payload using @payload/plugin-cloud-storage

Readme

ImageKit Storage for Payload (beta)

This package integrates ImageKit with Payload using the official @payloadcms/plugin-cloud-storage.

  • Uploads go directly to ImageKit.
  • Documents store filename, url, and optional transformations.
  • Optional named transformations are exposed on the document as read‑only text fields.

Changelog

  • Addeed support for Named Transformations
  • Changed type for DefaultTrasnformation and Transformations

Installation

pnpm add @lussoadv/payloadcms-storage-imagekit

Basic usage

Register the plugin in your payload.config.ts:

import { imagekitPlugin } from '@lussoadv/payloadcms-storage-imagekit'

export default buildConfig({
  // ...
  plugins: [
    imagekitPlugin({
      publicKey: process.env.IMAGE_KIT_PUBLIC_KEY!,
      privateKey: process.env.IMAGE_KIT_PRIVATE_KEY!,
      urlEndpoint: process.env.IMAGE_KIT_URL_ENDPOINT!,
      options: {
        restrictSignedUrl: true | false, // In ImageKit security options enabled, the plugin generate signed urls
      },
      collections: {
        media: {
          // Base folder in ImageKit. If omitted, the collection slug is used.
          folder: 'media',

          // Optional prefix inside the folder, useful for sub‑grouping.
          // prefix: 'uploads',

          // Disable Payload's local storage for this collection.
          disableLocalStorage: true,

          // Additional ImageKit options applied on upload / URL generation.
          options: {
            useUniqueFileName: false,
            tags: ['tag-1', 'tag-2'],

            /**
             * Default expiry (in seconds) for signed URLs generated
             * by generateURL, static handler and transformation URLs.
             */
            expireSeconds: 3600,
          },

          /**
           * Optional named transformations.
           * For each entry, a read‑only text field with the same `name`
           * will be added to the collection and populated afterRead
           * with a signed URL for that transformation.
           */
          defaultTransformation: 
            // Applied on generateUrl handler in the api response url => defaultTransformation
            { named: true, transformation: "named_transformation"} or 
            { width: '600', aspectRatio: '3-4', focus: 'auto', crop: 'at_max' }, //Transformation Type

          transformations: [
            { 
              name: 'thumbnail',
              named: true, 
              transformation: "named_transformation"
            } or 
            {
              name: 'thumbnail',
              transformation: { width: '300', height: '300', crop: 'at_max' } //Transformation Type
            },
          ],
        },
      },
    }),
  ],
})

How paths are built

For a given collection:

  • Upload folder in ImageKit:

    • folder || collection.slug is used as base folder.
    • If prefix is set, files are uploaded under <baseFolder>/<prefix>.
  • The same base folder/prefix convention is used by:

    • handleUpload when sending files to ImageKit.
    • generateURL when building signed or unsigned URLs.
    • staticHandler when redirecting to signed or unsigned URLs.
    • handleDelete when falling back to listFiles if fileId is not stored.

This keeps upload, URL generation, static proxying and deletion in sync.