with-imagekit

Next js app to upload pictures to Imagekit using Next API routes

Stars
8

⚠️ If you're using Next.js 14 and want to do things with Server Actions, follow here

Imagekit example

  • This example uses Imagekit for uploading images using Next API routes and displays the images using Next image

What you do need to setup

1- Create an account on Imagekit and grab your:

  1. Private key
  2. Public key
  3. Endpoint url
  4. Open next.config.js and place your path id on path: "https://ik.imagekit.io/<HERE>/"

2- Setup your env variables by running

Run cp .env.local.template .env.local