Wondering what’s next for npm?Check out our public roadmap! »

    @aiao/image-storage
    TypeScript icon, indicating that this package has built-in type declarations

    0.1.2 • Public • Published

    image-storage

    OSS 云图片大小请求计算,当前只支持 aliyun

    import { ImageStorage } from '@aiao/image-storage';
    import { ImageStorageAdapterAliyun } from '@aiao/image-storage/adapters/aliyun';
    const imageStorage = new ImageStorage({
      defaultOptions: {
        format: 'src'
      },
      defaultAdapter: 'aliyun',
      adapters: [new ImageStorageAdapterAliyun()]
    });
    
    const img = 'http://image-demo.oss-cn-hangzhou.aliyuncs.com/example.jpg';
    const newLink = imageStorage.requestOptions(img, {
      width: 400,
      height: 500
    });

    Keywords

    none

    Install

    npm i @aiao/image-storage

    DownloadsWeekly Downloads

    15

    Version

    0.1.2

    License

    MIT

    Unpacked Size

    130 kB

    Total Files

    63

    Last publish

    Collaborators

    • avatar