GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - cloudinary/cloudinary_java: Cloudinary Java Client Library

BranchesTags
Open more actions menu

Latest commit

 

History

761 Commits
761 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
cloudinary-core
cloudinary-core
 
 
cloudinary-http5
cloudinary-http5
 
 
cloudinary-taglib
cloudinary-taglib
 
 
cloudinary-test-common
cloudinary-test-common
 
 
docs
docs
 
 
examples
examples
 
 
gradle/wrapper
gradle/wrapper
 
 
samples
samples
 
 
tools
tools
 
 
.gitignore
.gitignore
 
 
AGENTS.md
AGENTS.md
 
 
CHANGELOG.md
CHANGELOG.md
 
 
CLAUDE.md
CLAUDE.md
 
 
LICENSE
LICENSE
 
 
MAVEN_CENTRAL_PUBLISHING_GUIDE.md
MAVEN_CENTRAL_PUBLISHING_GUIDE.md
 
 
README.md
README.md
 
 
SECURITY.md
SECURITY.md
 
 
build.gradle
build.gradle
 
 
context7.json
context7.json
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
java_shared.gradle
java_shared.gradle
 
 
publish.gradle
publish.gradle
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

Cloudinary Java SDK

Upload, transform, optimize, and manage images and videos with Cloudinary from Java — the com.cloudinary artifacts on Maven Central.

Build Maven Central License

Install

<dependency>
    <groupId>com.cloudinary</groupId>
    <artifactId>cloudinary-http5</artifactId>
    <version>2.6.0</version>
</dependency>
implementation 'com.cloudinary:cloudinary-http5:2.6.0'

For JSP tags, also add cloudinary-taglib.

Quick start

Set your API environment variable (Console > Settings > API Keys):

export CLOUDINARY_URL=cloudinary://<api_key>:<api_secret>@<cloud_name>

Upload an image and get an optimized delivery URL:

import com.cloudinary.Cloudinary;
import com.cloudinary.Transformation;
import com.cloudinary.utils.ObjectUtils;
import java.util.Map;

public class QuickStart {
    public static void main(String[] args) {
        try {
            // Reads CLOUDINARY_URL from the environment
            Cloudinary cloudinary = new Cloudinary();

            // Upload a remote image (a local File or path works the same way)
            Map result = cloudinary.uploader().upload(
                    "https://res.cloudinary.com/demo/image/upload/sample.jpg",
                    ObjectUtils.asMap("public_id", "quickstart-sample"));
            System.out.println("Uploaded: " + result.get("public_id"));

            // Build a 400x400 auto-cropped URL with automatic format and quality
            String url = cloudinary.url()
                    .transformation(new Transformation()
                            .width(400).height(400).crop("fill").gravity("auto")
                            .fetchFormat("auto").quality("auto"))
                    .generate((String) result.get("public_id"));
            System.out.println("Optimized URL: " + url);
        } catch (Exception e) {
            System.err.println("Quick start failed: " + e.getMessage());
            System.err.println("Check that CLOUDINARY_URL is set (Console > Settings > API Keys).");
            System.exit(1);
        }
    }
}

Save as QuickStart.java, compile against cloudinary-http5 and its dependencies, and run. Create a free account if you don't have one — see Get credentials for the options, including a throwaway environment for testing.

Common tasks

  • Get Cloudinary credentials
  • Add the dependency and make a first call
  • Configure credentials in code, environment, or a framework
  • Upload an image
  • Upload a large video
  • Sign a browser upload
  • Transform and deliver an image
  • Transform and deliver a video
  • Search and manage assets
  • Moderate an upload
  • Use structured metadata
  • Use with Spring Boot
  • Use the JSP tag library
  • Troubleshoot errors

Runnable versions live in examples/ — each is a complete file you can run directly.

When to use this SDK

Use this library in server-side Java: uploads, signed operations, asset administration, search, moderation, and delivery URL generation.

For other jobs, better-fitting tools exist:

  • Android apps: the Android SDK (md); cloudinary-http5 targets server-side JVMs.
  • Complete in-browser upload UI: Upload Widget (md).
  • Text-to-image generation and image-to-video: platform APIs (md), not wrapped by this library.
  • Multi-step media workflow automation: MediaFlows (md).
  • Interactive agent-driven asset operations: Cloudinary MCP servers and Skills (md).

The full capability map — plus the Skills, MCP servers, and CLI worth setting up first — is in docs/platform-capabilities.md.

Status and compatibility

Stable, actively maintained. See CHANGELOG.md.

SDK version Java
2.x 8 and later
1.1.0 – 1.39.0 6 and later (no longer maintained)

cloudinary-taglib targets javax.servlet / javax.servlet.jsp, not Jakarta EE 9+.

Documentation

  • Task docs for this repository — snippets compile against this SDK, and documented behaviour was observed against a live environment.
  • Java SDK guide — the full documentation (md).

Documentation links in this README point at the browsable HTML page, with an (md) companion link that returns the same page as raw Markdown. Inside docs/ and examples/ the links are Markdown-only, since those files are written to be read by coding agents. Either form works for any page: add .md for Markdown, drop it for HTML.

For AI coding agents

  • Contributing to this repo: read AGENTS.md.
  • Using the SDK in your own project: the pages in docs/ describe this SDK's behaviour; start with platform-capabilities for what the library covers. They describe the 2.x API.

Support

  • SDK bugs and feature requests: GitHub issues
  • Account and platform questions: Cloudinary support

Security

See SECURITY.md for private vulnerability reporting. Keep your api_secret in server-side code; for client uploads, use the server-signed pattern in Sign a browser upload.

License

Released under the MIT license — see LICENSE. Copyright (c) Cloudinary Ltd.

About

Cloudinary Java Client Library

Topics

cloudinarycloudinary-apicloudinary-java-librarycloudinary-java-sdkcloudinary-sdkhacktoberfestimage-manipulationjavasdk-javavideo-manipulation

Resources

Readme
MIT license

Security policy

Security policy
Activity
Custom properties

Stars

176 stars

Watchers

28 watching

Forks

113 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.