/content mapping & automation
Manage site images via API
In this lesson, we’ll walk through how to manage and upload images to a Duda website using the API. You’ll learn both how image hosting works within the Duda platform and how to properly push media assets via API calls.
API Reference
POST https://api.duda.co/api/sites/multiscreen/resources/{site_name}/upload
Upload an image to the website from an external source. The image is hosted on Duda’s CDN and becomes available for anyone working on the site, ensuring fast, optimized delivery.
Note: You can include up to 10 image URLs in the payload per request.
Documentation:
Upload Resource
How Duda handles site images
When you upload an image to Duda—whether manually through the editor or programmatically via the API—Duda automatically optimizes it for performance. The system generates multiple image sizes and compresses each version to ensure fast load times across different devices and screen resolutions.
Once optimized, each version is securely stored on Duda’s
Content Delivery Network (CDN). This ensures that the images load quickly and reliably, no matter where your visitors are located.
Each image hosted on the CDN is assigned a unique URL that includes:
- The cdn domain, indicating it’s served through Duda’s CDN.
- The site alias, which identifies which content library (and site) the image belongs to.
These unique URLs are used behind the scenes when adding images into widgets, backgrounds, or as connected content.
Important
Original images must be publicly accessible. Duda fetches and optimizes them before hosting on its CDN.
If an image is set to private or restricted, the upload will fail. Make sure your image URLs are public and accessible.
Note
Every site has its own content library, so uploaded assets are specific to the site they were added to.