Skip to main content
Version: Canary 🚧

prefer-ideal-image

Ensures that @theme/IdealImage theme component provided by Docusaurus theme-classic is used instead of <img> tag for images.

Rule Details

Examples of incorrect code for this rule:

<img src="{thumbnail}" />

<img src="path/to/image" />

Examples of correct code for this rule:

import Image from '@theme/IdealImage'

<Image src='path/to/image' />

<Image src='path/to/image' />