Community Plugin
View plugin on GitHubgatsby-remark-gifs-to-videos
gatsby-remark-gifs-to-videos is a Gatsby remark plugin to transform animated GIF to autoplay videos.
The main purpose is to improve performances.
Usage
- Download
gatsby-remark-gifs-to-videosfrom the NPM registry:
yarn add gatsby-remark-gifs-to-videos- Add the plugin in your
gatsby-config.jsfile
module.exports = {
plugins: [
{
resolve: "gatsby-transformer-remark",
options: {
plugins: [
"gatsby-remark-gifs-to-videos",
//
// --- Optional ---
// "gatsby-remark-copy-linked-files",
],
},
},
],
}| Option | Required | Type | Default |
|---|---|---|---|
| maxHeight | false |
Number | 480 |
| maxWidth | false |
Number | 680 |
| autoplay | false |
Boolean | true |
| loop | false |
Boolean | true |
| muted | false |
Boolean | true |
| playsinline | false |
Boolean | true |
| controls | false |
Boolean | false |
| preload | false |
String | “auto” |