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

cloudinary-microurl

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cloudinary-microurl

A tiny library to generate cloudinary URLs from options objects

  • 1.4.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
169
decreased by-72.96%
Maintainers
2
Weekly downloads
 
Created
Source

Cloudinary MicroURL

🗜 Cloudinary Micro URLnpm travis

A tiny (346B), 0 dependency, fully-tested library to generate Cloudinary URLs from an options object.

The official Cloudinary js library is ~600kb. This saves you 1700%. If this were a crypto coin, you wouldn't be here, would you?

Installation

yarn add cloudinary-microurl
npm install cloudinary-microurl

Usage

const cloudinaryUrl = require('cloudinary-microurl')
const url = cloudinaryUrl('twitter.jpg', {
  secure: true,
  cloud_name: 'demo',
  gravity: 'face',
  flags: 'progressive',
  quality: 80
})

const img = new Image();
img.src = url

Supported Features

This library supports the following Cloudinary features:

  • Fetch format
  • Crop
  • Effect
  • Flags
  • Gravity
  • Height
  • Radius
  • Quality
  • Width
  • Dpr

Here's what they look like in code:

fetch_format: "f",
crop: "c",
effect: "e",
flags: "fl",
gravity: "g",
height: "h",
radius: "r",
quality: "q",
width: "w",
dpr: "dpr"

Fetch mode

Set {source: 'fetch'} to activate cloundinary fetch mode. You need to enable it in the security options. The image name should be a full URL.

Contributions

If there's an effect thats missing, create an Issue or an PR. It's SUPER EASY!

Thanks to the original author

This library was originally created by josephg

Keywords

FAQs

Package last updated on 14 Sep 2018

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