Skip to content

Commit

Permalink
Add test case in dogfooding
Browse files Browse the repository at this point in the history
  • Loading branch information
tats-u committed Mar 11, 2023
1 parent 0edc239 commit f0c2e40
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions website/_dogfooding/_docs tests/tests/img-tests.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import docusaurusImport from '@site/static/img/docusaurus.png';

export const docusaurusRequire = require('@site/static/img/docusaurus.png');

import docusaurusWebPImport from './img/docusaurus.webp';

import docusaurusAVIFImport from './img/docusaurus.avif';

![URL encoded image](./img/oss_logo%20%282%29.png)

## Regular images
Expand All @@ -20,6 +24,16 @@ export const docusaurusRequire = require('@site/static/img/docusaurus.png');

## Ideal images

PNG

<Image img={docusaurusImport} />

<Image img={docusaurusRequire} />

WebP

<Image img={docusaurusWebPImport} />

AVIF

<Image img={docusaurusAVIFImport} />
Binary file not shown.
Binary file not shown.
2 changes: 2 additions & 0 deletions website/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,8 @@ const config = {
max: 1030,
min: 640,
steps: 2,
// For ideal-image-plugin test
enableWebpAvif: true,
// Use false to debug, but it incurs huge perf costs
disableInDev: true,
}),
Expand Down

0 comments on commit f0c2e40

Please sign in to comment.