oss-src
v1.0.2
Published
阿里云oss处理包
Downloads
7
Readme
dispose aliyun oss url
- [x] 图片缩放
- [x] 图片水印
- [x] 质量变换
- [x] 格式转换
- [x] 图片水印
- install
yarn add oss-src
// or
npm install oss-src
- use
import OssSrc from 'oss-src';
// change image type
const newUrl = new OssSrc('https://image-demo.oss-cn-hangzhou.aliyuncs.com/example.jpg').format('webp').getUrl();
// add watermark
const newUrl = new OssSrc('https://image-demo.oss-cn-hangzhou.aliyuncs.com/example.jpg')
.watermarkLocation(100, 'center', 1, 1, 1)
.watermarkText('我们')
.getUrl(),