📦 plugin-ideal-image
Docusaurus Plugin to generate an almost ideal image (responsive, lazy-loading, and low quality placeholder).
info
By default, the plugin is inactive in development so you could always view full-scale images. If you want to debug the ideal image behavior, you could set the disableInDev option to false.
Installation
- npm
- Yarn
- pnpm
- Bun
npm install --save @docusaurus/plugin-ideal-image
yarn add @docusaurus/plugin-ideal-image
pnpm add @docusaurus/plugin-ideal-image
bun add @docusaurus/plugin-ideal-image
Usage
This plugin supports the PNG and JPG formats only.
import Image from '@theme/IdealImage';
import thumbnail from './path/to/img.png';
// your React code
<Image img={thumbnail}