posthtml-uploadcare-gif2video
v0.0.1
Published
Convert img with GIF to video.
Downloads
5
Readme
posthtml-uploadcare-gif2video
Convert img with GIF to video.
Plugin for PostHTML.
Before
<img src="https://ucarecdn.com/af0136cc-c60a-49a3-a10f-f9319f0ce7e1/road.video.gif" />
After
<video autoplay loop muted webkit-playsinline playsinline>
<source src="https://ucarecdn.com/af0136cc-c60a-49a3-a10f-f9319f0ce7e1/gif2video/-/format/webm/road.video.gif" type="video/webm">
<source src="https://ucarecdn.com/af0136cc-c60a-49a3-a10f-f9319f0ce7e1/gif2video/-/format/mp4/road.video.gif" type="video/mp4">
</video>
Install
npm install posthtml-uploadcare-gif2video --save
Usage
const posthtml = require('posthtml')
posthtml()
.use(require('posthtml-uploadcare-gif2video'))
.process(html/*, options */)
.then(result => console.log(result.html))