You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
import clickhouse-local-1 from '@site/static/images/chdb/guides/clickhouse-local-1.png'
77
77
import clickhouse-local-2 from '@site/static/images/chdb/guides/clickhouse-local-2.png'
78
78
import clickhouse-local-3 from '@site/static/images/chdb/guides/clickhouse-local-3.png'
79
+
import Image from '@theme/IdealImage';
79
80
```
80
81
81
-
Use the `<img/>` tag to place your image in the appropriate place:
82
+
To render images we use a fork of the IdealImage plugin. This generates multiple variants of an image, [asynchronously loading them as well as selecting the most appropriate based on the network connection](https://github.com/stereobooster/react-ideal-image/blob/master/introduction.md).
83
+
84
+
Ensure you import the `Image` component as shown above.
85
+
86
+
Use the `<Image/>` tag to place your image in the appropriate place:
82
87
83
88
```markdown
84
89
Here is some example text which refers to the image below:
85
90
86
-
<img src={clickhouse-local-1}
87
-
alt='DESCRIPTION OF THE IMAGE'
88
-
style={{width: '800px'}} // optional
89
-
/>
91
+
<Image img={clickhouse-local-1} alt='DESCRIPTION OF THE IMAGE' size="md" border background="black"/>
90
92
91
93
Here is another paragraph...
92
94
```
93
95
96
+
This component takes a number of props:
97
+
98
+
1.`img` - the imported image
99
+
2.`alt` - mandatory alternate text specified
100
+
3.`size` - either `lg` (width 1024px), `md` (width 600px), `sm` (width 300px) or `logo` (48x). This sets the maximum image size. Lower resolutions maybe used on smaller screens or slower connections.
101
+
4.`border` - Applies a border. **Use for screenshots only.**
102
+
5.`background` - either `white` or `black`. Applicable if your image is transparent. All new images must use `black`.
103
+
94
104
## Codeblocks
95
105
96
106
Codeblocks are defined using backticks. For example:
0 commit comments