Image Optimization
Use Next.js image optimization in your MDX documents
Contentlayer integration supports the built-in next/image
component by passing width
and height
property 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 doesn't need to enable it.
Example
Assume the image is under the /public
folder.
Last updated on