docs/wiki/style/images.mdx
A picture says a thousand words. Try to use images and diagrams wherever you can if it will provide more clarity to the user.
1500px. This helps keep scaling consistent.1500px20px blank margins in-image around all four sides for breathability of the image.{{action-depicted}}_{{image-step-or-variation-number-if-needed}}_{{hasura-feature-depicted}}_{{hasura-feature-version}}.pngconnect-database-google-cloud_step-2_console_2-7-1.png#FC336D }}>#FC336D</pre> for all image markup.:::info Note admonitions for new features detailing the version at which the feature is supported
from.Animated images should be used sparingly and should be used to show a user how to perform a task.
1500px x 900px.All videos should be converted and compressed to the webm format before being added to the docs. This can be done using
ffmpeg:
ffmpeg -i <ORIGINAL>.mp4 -c vp9 -b:v 0 -crf 55 <DESIRED_FINAL_FILENAME>.webm
The -crf flag controls the quality of the video. The lower the value, the higher the quality. The default value is
23. The range is 0-63, with 0 being lossless and 63 being the worst possible quality. A value of 55 is
generally considered to be a good balance between quality and file size.
Use the <Player /> component to add the video to the docs. The component takes the following props:
| Prop | Type | Description | Required | Default |
|---|---|---|---|---|
src | string | The path to the video file. | Yes | |
autoPlay | boolean | Whether the video should autoplay when the page loads. | true | |
loop | boolean | Whether the video should loop when it reaches the end. | true | |
muted | boolean | Whether the video should be muted. | true | |
playsInline | boolean | Whether the video should play inline. | true | |
showControls | boolean | Whether the video should show controls. | false |
You can import the component inside any .mdx file like this:
import Player from '@site/src/components/Player';
And then use it like this:
<Player src="/img/<SUBDIRECTORY>/<FILENAME>.webm" />