Last updated: Jul-17-2025
This quick start lets you get an end-to-end implementation up and running using the PHP SDK in 5 minutes or less.
Prerequisites 1. Set up and configure the SDK Install the SDKUse Composer
to manage your PHP library dependency, and install Cloudinary's PHP library.
Run the following command in the root folder of your project to add the SDK and update your composer.json
:
Install dependencies, including Cloudinary's PHP package, by running the following command:
If you don't have the necessary permissions you can run the file itself:
php composer.phar install
.
When writing your own applications, follow your organization's policy on storing secrets and don't expose your API secret.
In a new PHP file, php_quickstart.php
, use your API environment variable to configure your Cloudinary credentials. Replace cloudinary://my_key:my_secret@my_cloud_name
with your actual environment variable value:
Use the upload
method of the UploadApi
class to upload assets to Cloudinary. The code is encased in HTML to format and display the response:
php_quickstart.php (continued)
3. Get info about the imageUse the asset
method of the AdminApi
class to return the details of our uploaded asset. The code is encased in HTML to format and display the response:
php_quickstart.php (continued)
4. Transform and deliver the imageUse the imageTag
method to generate the full image URL based on the specified transformation parameters and add the image tag to your HTML code:
php_quickstart.php (continued)
5. Run your codeRun your file by entering the following command in your terminal:
Youâll see console output for each step of the quick start. Click the generated URLs to view your uploaded image in the browser.
View the completed codeYou can fork the sample code for this quick start from GitHub.
Next stepsâï¸ Feedback sent!
âï¸Â  ErrorUnfortunately there's been an error sending your feedback.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4