react-native-uploadcare-image
v2.0.0
Published
Uploadcare image wrapper for react native
Downloads
9
Readme
react-native-uploadcare-image
Example
import UploadcareImage from 'react-native-uploadcare-image'
import defaultImage from './default-image.jpg'
export default function Avatar () {
const url = 'http://www.ucarecdn.com/cca76eb6-1d25-4fee-a7a9-9516cc161b73/'
return (
<UploadcareImage
url={url}
width={32}
height={32}
style={{ borderRadius: 16 }}}
defaultImage={defaultImage} />
)
// url is transformed into:
// http://www.ucarecdn.com/cca76eb6-1d25-4fee-a7a9-9516cc161b73/-/scale_crop/64x64/center/-/quality/lighter/
// ...but `resizeImage` prop can be passed to customise:
// `resizeImage={(url, width, height) => { return /* ... */ }}`
}