Lodol Docs

Cloudinary

API actions for the Cloudinary integration.

Cloudinary

Upload and manage media assets with Cloudinary.


Delete asset

Delete an asset from Cloudinary by its public ID.

Parameters

ParameterTypeRequiredDescription
public_idstringYesThe public ID (unique name) of the asset to delete.
resource_typestringNoThe kind of asset to delete. Raw means any file that is not an image or a video. Defaults to Image.

Response

{
  "public_id": "mock_public_id",
  "result": "deleted"
}

List assets by tag

List all Cloudinary assets that have a specific tag.

Parameters

ParameterTypeRequiredDescription
tagstringYesOnly assets labeled with this tag are returned.
resource_typestringNoThe kind of asset to look for. Raw means any file that is not an image or a video. Defaults to Image.
max_resultsnumberNoThe most assets to return. If left blank, Cloudinary returns up to 10.

Response

{
  "assets": [
    {
      "format": "jpg",
      "public_id": "mock_asset_id",
      "resource_type": "image",
      "secure_url": "https://res.cloudinary.com/demo/image/upload/mock_asset_id.jpg",
      "type": "upload"
    }
  ],
  "count": 1
}

Upload image from URL

Upload an image to Cloudinary from a web link (URL).

Parameters

ParameterTypeRequiredDescription
image_urlstringYesThe web link (URL) of the image to upload.
folderstringNoThe folder to store the uploaded image in, for example products/photos. If left blank, the image is stored in your main folder.
public_idstringNoA custom name to identify the file in Cloudinary (its public ID). If left blank, Cloudinary generates one automatically.

Response

{
  "bytes": 12345,
  "public_id": "mock_public_id",
  "secure_url": "https://res.cloudinary.com/demo/image/upload/v1234567890/mock_public_id.jpg",
  "version": "1234567890"
}

On this page