# cloudinary-build-url

> Lighter Url generator for Cloudinary

Latest version **0.2.4** (published 2022-01-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install cloudinary-build-url
pnpm add cloudinary-build-url
yarn add cloudinary-build-url
bun add cloudinary-build-url
```

## Health

**Score 25/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.4 |
| Published | 2022-01-18 |
| First published | 2020-11-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 67.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 52 |
| Author | Maya Shavin |
| Maintainers | colbyfayock, mayashavin |
| Keywords | cloudinary, cloudinary-url, url, video, image, optimization, api, light, typescript |

## Links

- npm: https://www.npmjs.com/package/cloudinary-build-url
- Repository: https://github.com/mayashavin/cloudinary-api
- Homepage: https://github.com/mayashavin/cloudinary-api/tree/main/packages/url#README
- Issues: https://github.com/mayashavin/cloudinary-api/issues
- npm.io page: https://npm.io/package/cloudinary-build-url

## Dependencies (1)

- [@cld-apis/utils](https://npm.io/package/@cld-apis/utils.md) ^0.2.0

## Alternatives

- [@oh-my-pi/pi-natives](https://npm.io/package/@oh-my-pi/pi-natives.md) — 51.8K weekly downloads
- [@capgo/capacitor-light-sensor](https://npm.io/package/@capgo/capacitor-light-sensor.md) — 3.0K weekly downloads
- [@heyhuynhgiabuu/pi-diff](https://npm.io/package/@heyhuynhgiabuu/pi-diff.md) — 492 weekly downloads
- [@lotsa/verdant-lang-asm](https://npm.io/package/@lotsa/verdant-lang-asm.md) — 38 weekly downloads
- [new-era-syntax](https://npm.io/package/new-era-syntax.md) — 20 weekly downloads

## Recent versions

- 0.2.4 (latest) — 2022-01-18
- 0.2.3 — 2022-01-18
- 0.2.1 — 2021-02-03
- 0.2.0 — 2021-02-03
- 0.1.1 — 2020-12-15
- 0.1.0-alpha.1 — 2020-12-08
- 0.1.0 — 2020-12-01
- 0.0.5 — 2020-11-19
- 0.0.4 — 2020-11-16
- 0.0.3 — 2020-11-15
- 0.0.2 — 2020-11-15
- 0.0.1 — 2020-11-15

## README

# `cloudinary-build-url`

[![Netlify Status](https://api.netlify.com/api/v1/badges/c64e43df-e77d-44fb-a0e0-5ca79f8ef188/deploy-status)](https://app.netlify.com/sites/cloudinary-build-url/deploys)
[![npm version][npm-version-src]][npm-version-href]
[![npm downloads][npm-downloads-src]][npm-downloads-href]
[![Codecov][codecov-src]][codecov-href]
[![License][license-src]][license-href]

![Cloudinary URL Builder](https://res.cloudinary.com/mayashavin/image/upload/v1605534519/logos/logo-light.png)(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.

[📖&nbsp;Documentation](https://cloudinary-build-url.netlify.app)

## Installation

```bash
yarn add cloudinary-build-url
```

or 

```bash
npm i cloudinary-build-url
```

## Use with TypeScript

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

```bash
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)
```

<!-- Badges -->
[npm-version-src]: https://img.shields.io/npm/v/cloudinary-build-url/latest.svg
[npm-version-href]: https://npmjs.com/package/cloudinary-build-url

[npm-downloads-src]: https://img.shields.io/npm/dt/cloudinary-build-url.svg
[npm-downloads-href]: https://npmjs.com/package/cloudinary-build-url

[codecov-src]: https://codecov.io/gh/mayashavin/cloudinary-api/branch/main/graph/badge.svg?token=S8V8GIDYPC
[codecov-href]: https://codecov.io/gh/mayashavin/cloudinary-api

[license-src]: https://img.shields.io/npm/l/cloudinary-build-url.svg
[license-href]: https://npmjs.com/package/cloudinary-build-url

---
_Source: https://npm.io/package/cloudinary-build-url · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
