npm.io
6.3.2 • Published 2 months ago

@cloudinary-util/url-loader

Licence
MIT
Version
6.3.2
Deps
3
Size
548 kB
Vulns
0
Weekly
0
Stars
14
Cloudinary

npm GitHub

Cloudinary URL Loader

A function to construct a Cloudinary URL based on a set of options.

The loader works by loading a list of "plugins" which provide option-based configuration for features like optimization, cropping, and background removal.

Getting Started

This is a community library supported by the Cloudinary Developer Experience team.

Getting Started

The minimum node version officially supported is version 18.

  • Install Cloudinary URL Loader:
npm install @cloudinary-util/url-loader
  • Import the dependency:
import { constructCloudinaryUrl } from '@cloudinary-util/url-loader';
  • Create a Cloudinary URL:
const url = constructCloudinaryUrl({
  options: {
    src: 'my-public-id',
    width: 800,
    height: 600
  },
  config: {
    cloud: {
      cloudName: 'my-cloud'
    }
  }
});