- a versatile react img component
- set low quality image
- set high quality image
- lazy loading
npm install --save dyno-img-react
import React, { Component } from 'react'
import DynoImg from 'dyno-img-react'
class Example extends Component {
render () {
return (
<DynoImg
src={"low-quality-img-url"}
srcHigh={"high-quality-img-url"}
alt={"alternate"}
// rootMargin defines the Margin around the root. The hq image will get loaded at the margin
rootMargin={"10%"}
/>
)
}
}
MIT © albseb511