-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Import an Image or a mp4 video
Pierre Guceski edited this page Sep 4, 2019
·
6 revisions
To import an image or a video within a documentation page, store your image/video in the /static/images/ folder with a file path corresponding to your documentation page file path. Then use the following partial code within your content:
{{< img src="path/to/your/image" alt="Your image description" responsive="true">}}
Note: only .jpg, .png, and .gif format are supported for images. But rather than using a .gif you should use a .mp4.
Available parameters are:
-
src- [Required]: Path to your image in thestatic/imagesof the documentation repo. The image path should match your current file path incontent/en/folder -
alt- [Required]: A short description of your image -
responsive- [Required]: If set to true, allows the image to be responsive on all devices. -
href- [Optional]: Set an href link for the image. -
width- [Optional]: Override the width of your image, can be an absolute or relative value. -
height- [Optional]: Override the height of your image, can be an absolute or relative value.
To import a .mp4 video on the doc page use the following partial code:
{{< img src="path/to/your/video.mp4" alt="Your image description" video="true" responsive="true">}}
Available parameters are:
-
src- [Required]: Path to your video in thestatic/imagesof the documentation repo. The video path should match your current file path incontent/en/folder -
alt- [Required]: A short description of your image -
video- [Required]: Set it totrueto enable proper video display. -
responsive- [Required]: If set to true, allows the image to be responsive on all devices. -
href- [Optional]: Set an href link for the image. -
width- [Optional]: Override the width of your image, can be an absolute or relative value. -
height- [Optional]: Override the height of your image, can be an absolute or relative value.