Skip to content
Back to skills

Cloudinary

ASecurity

> **Verification Tier:** `code_example_tested` | **Last Verified:** 2026-11-18 > **Official Docs:** https://cloudinary.com/documentation/node_integration

  • 13 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added December 2, 2026
ai-agentsbashnextjsnodeawsapidatabasebackendsecuritydocumentation

Works with

  • cli
  • api

Security analysis

A92/100
  • mediumInstalls packages at runtime which could introduce malicious dependencies
  • mediumInstalls packages at runtime which could introduce malicious dependencies

Pro scans all 2 files and shows the line behind each finding

Scanned December 2, 2026

npx -y skills add ashish7802/awesome-api-skills --skill cloudinary --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Cloudinary?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Cloudinary
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ashish7802-cloudinary/badge)](https://www.skillsdirectory.com/skills/ashish7802-cloudinary)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# Cloudinary API & SDK Skill

> **Verification Tier:** `code_example_tested` | **Last Verified:** 2026-11-18  
> **Official Docs:** https://cloudinary.com/documentation/node_integration

## Overview
Cloudinary provides media storage, signed direct browser uploads, responsive image/video transformations (`f_auto,q_auto`), and CDN delivery via the `cloudinary` v2 SDK.

## Installation
```bash
npm install cloudinary
pip install cloudinary
```

## Authentication
Configure `CLOUDINARY_URL` (`cloudinary://<api_key>:<api_secret>@<cloud_name>`) or individual `CLOUDINARY_CLOUD_NAME`, `CLOUDINARY_API_KEY`, and `CLOUDINARY_API_SECRET` variables. Always set `secure: true` for HTTPS delivery URLs.

## Core Concepts
- **Signed Direct Browser Uploads**: Generate a short-lived timestamped signature on your server via `cloudinary.utils.api_sign_request(paramsToSign, apiSecret)`, return `{ signature, timestamp, apiKey, cloudName }` to the browser, and upload directly from client to Cloudinary without proxying large files through your backend or exposing `CLOUDINARY_API_SECRET`.
- **Automatic Delivery Optimization**: Apply `fetch_format: "auto"` (`f_auto`) and `quality: "auto"` (`q_auto`) on delivery URLs to serve AVIF/WebP automatically.
- **Eager Transformations**: Pre-generate expensive video/large-image derivatives asynchronously (`eager_async: true`) during upload.

## Error Handling & Rate Limits
- Admin API endpoints have hourly rate limits (e.g., 500–2,000 req/hr depending on plan); use Upload API and Delivery URLs on hot user paths instead of polling Admin API.
- Validate uploaded file MIME types, byte size limits, and allowed folders server-side when signing upload presets.

## Security Best Practices
- Never expose `CLOUDINARY_API_SECRET` in client bundles.
- Prefer signed uploads over unsigned upload presets in authenticated apps to prevent quota abuse.
- Enable Strict Transformations for sensitive or paid transformation presets to prevent arbitrary URL parameter billing attacks.

## AI Pitfalls
- Importing `cloudinary` root instead of `import { v2 as cloudinary } from "cloudinary"`.
- Signing parameters that do not exactly match the form fields sent in the browser upload (causes `Invalid Signature` HTTP 401).
- Calling Admin API `resources()` on every page request instead of storing `public_id` in your database.

## Production Checklist
- [ ] `secure: true` enabled globally for HTTPS URLs
- [ ] Browser uploads use server-generated `api_sign_request` signatures
- [ ] `f_auto` and `q_auto` applied to delivery URLs
- [ ] `public_id` persisted in app DB (not queried via rate-limited Admin API)

## References
- [Cloudinary Node.js Integration](https://cloudinary.com/documentation/node_integration)
- [Signed Upload Authentication](https://cloudinary.com/documentation/upload_images#generating_authentication_signatures)

## Related skills
- [`cloudflare-r2`](../cloudflare-r2/SKILL.md) — works well with
- [`aws-s3`](../aws-s3/SKILL.md) — alternative to
- [`nextjs`](../nextjs/SKILL.md) — integrates with

Files in this skill

  • SKILL.md3 KB
  • examples/quickstart.ts865 B

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.