Next.js
Real-time image resizing and automatic optimization in Next.js using ImageKit.io.
Image resizing can be used automatically with Next.js' next/image component.
Here is an implementation using a custom loader which applies ImageKit image resizing, next/image will set an optimal width and quality for a given client.
Inside the imageKitLoader
function, you will have to replace urlEndpoint
with your ImageKit account's URL-endpoint. You can get URL-endpoint from your ImageKit dashboard - https://imagekit.io/dashboard/url-endpoints.
Last updated