cloudinary-build-url
    TypeScript icon, indicating that this package has built-in type declarations

    0.2.1 • Public • Published

    cloudinary-build-url

    Netlify Status npm version npm downloads Codecov License

    Cloudinary URL Builder(https://cloudinary-build-url.netlify.app)

    The lighter URL builder API for Cloudinary with all features in TypeScript.

    By default, f_auto (auto format per browser) and q_auto (auto quality per device) are enabled. And all the urls are generated as secured HTTPS format, unless user states otherwise.

    📖 Documentation

    Installation

    yarn add cloudinary-build-url

    or

    npm i cloudinary-build-url

    Usage

    Build a delivery url for image

    import { buildUrl } from 'cloudinary-build-url'
    
    const src = buildUrl('example', {
      cloud: {
        cloudName: 'demo',
      },
      transformations: {
        resize: {
          type: 'scale',
          width: 500,
          height: 500,
        }
      }
    })
    
    console.log(src)
    

    Or

    import { setConfig, buildUrl } from 'cloudinary-build-url'
    
    // Set configuration for Cloudinary
    setConfig({
      cloudName: 'demo'
    })
    
    // Build URL
    const src = buildUrl('example', {
      transformations: {
        resize: {
          type: 'scale',
          width: 500,
          height: 500,
        }
      }
    })
    
    console.log(src)
    

    Build a delivery URL for video

    import { buildVideoUrl } from 'cloudinary-build-url'
    
    const src = buildVideoUrl('dog', {
      cloud: {
        cloudName: 'demo',
      },
      transformations: {
        resize: {
          type: 'scale',
          width: 500,
          height: 500,
        }
      }
    })
    
    console.log(src)
    

    Install

    npm i cloudinary-build-url

    DownloadsWeekly Downloads

    6,230

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    68.9 kB

    Total Files

    88

    Last publish

    Collaborators

    • mayashavin