1

I am using ImageKit to serve all images/videos files in my nextjs application and Imagekit is pointing to a CDN bucket where I am pushing all the assets during the build. All the images are imported into specific components. My nextjs config looks like this:

{
   ... // nextjs config 
   assetPrefix: process.env.NODE_ENV === "production"? process.env.IMAGEKIT_PATH: "",
}

Because of this, all the requests for js/json files are also going via ImageKit. How can I set different assetPrefix for these files?

sahil solanki
  • 507
  • 6
  • 20

0 Answers0