Image Optimization
Use Next.js image optimization in your MDX documents
Contentlayer integration supports the built-in next/image
component by looking for the size of image automatically.
You can enjoy the benefits of Next.js Image Optimization without extra configurations.
Under the hood, It gets the image size using rehype-img-size
, then display it
via next/image
.
Usage
You don't need to explicitly enable it.
Example
Assume the image is under the /public
folder.
Last updated on