Skip to content

Commit

Permalink
Use spaces in readme to not get displayed as 8
Browse files Browse the repository at this point in the history
  • Loading branch information
Legend-Master committed Aug 12, 2024
1 parent 61d6a51 commit a84f936
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ And add the configuration to `docusaurus.config.js`/`docusaurus.config.ts`
```ts
const config: Config = {
...
plugins: ['native-ideal-image'],
plugins: ['native-ideal-image'],
}
```

Expand All @@ -25,24 +25,24 @@ Then you can use it in your project like this
import image from '../images/some-image.jpeg'

export default function App() {
return (
<main>
<NativeIdealImage img={image} />
</main>
)
return (
<main>
<NativeIdealImage img={image} />
</main>
)
}
```

By default, this will transform the image into a jpeg source and a webp source and also a webp format low quality placeholder, and end up like this

```html
<picture
class="picture_x2na"
style="--lqip: url(data:image/webp;base64,UklGRj4AAABXRUJQVlA4IDIAAADQAQCdASoQAAwABUB8JZQAAudcoVPyIAD+uVyF4iJZsGTWpdieB7utExa6oMeh0PusAA==);"
class="picture_x2na"
style="--lqip: url(data:image/webp;base64,UklGRj4AAABXRUJQVlA4IDIAAADQAQCdASoQAAwABUB8JZQAAudcoVPyIAD+uVyF4iJZsGTWpdieB7utExa6oMeh0PusAA==);"
>
<source srcset="assets/native-ideal-image/some-image-b0600-2160.webp 2160w" type="image/webp" />
<source srcset="assets/native-ideal-image/some-image-4cb20-2160.jpeg 2160w" type="image/jpeg" />
<img loading="lazy" sizes="auto" width="2160" height="1620" />
<source srcset="assets/native-ideal-image/some-image-b0600-2160.webp 2160w" type="image/webp" />
<source srcset="assets/native-ideal-image/some-image-4cb20-2160.jpeg 2160w" type="image/jpeg" />
<img loading="lazy" sizes="auto" width="2160" height="1620" />
</picture>
```

Expand Down

0 comments on commit a84f936

Please sign in to comment.