Last updated: Nov-14-2023
If you're an experienced WordPress developer and are looking to customize and extend the Cloudinary WordPress plugin, you can make use of some additional tools and options to get the best out of your setup.
Setting the connection string as a constant
One way you might want to configure the plugin is to define your Cloudinary connection string as a constant. Setting the constant will prevent any users from editing or updating the associated Cloudinary cloud via the WordPress UI. To set your connection string, add the following line to your wp-config.php
file, replacing the key
, secret
and cloudname
with your own values:
Actions and filters
The Cloudinary WordPress plugin exposes a number of actions and filters that you can hook into to customize and extend the functionality of the plugin. You can find a full reference of the available options here.
Managing media sync using the WP-CLI
The WP-CLI can be used to perform a number of tasks on your WordPress site using the command line. The Cloudinary plugin extends this capability by adding two additional CLI commands:
-
The analyze command analyzes the current state of your media assets, telling you how many assets you have that are "synced", "unsynced" or "unsupported".
-
The sync command will begin syncing any unsynced assets to Cloudinary. You can use this as an alternative method for syncing your assets in bulk.
Syncing external assets
When using the Cloudinary WordPress plugin, by default, you can only sync media assets that are defined as internal media assets, i.e, the GUID of the assets has to belong to the domain of your WordPress website. External assets will be marked as "unsupported".
For more information about syncing external assets to Cloudinary, see How to sync external media assets?
- Find out more about Cloudinary's Digital Asset Management solution.
- Learn about our powerful image and video transformations.