Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cloudinary-build-url

Package Overview
Dependencies
Maintainers
2
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudinary-build-url

Lighter Url generator for Cloudinary

  • 0.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

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

Use with TypeScript

In order to start using the lib with TypeScript, please install @cld-apis/types as devDependencies.

npm i -D @cld-apis/types

#OR

yarn add -D @cld-apis/types

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)

Keywords

FAQs

Package last updated on 18 Jan 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc