CDN is a geographically distributed system of servers that delivers content to client devices from the servers nearby, which saves time on long-distance data exchange. In addition to faster page load, delivery networks store cached files on multiple servers and provide a better uptime in case some servers become inaccessable.
Uploadcare uses Akamai CDN and a proprietary CDN layer for better performance and reliability.
Access files in Uploadcare CDN at
ucarecdn.com over HTTP/HTTPS liks this:
You can add CDN operations by including directives in the CDN URL:
:uuidstands for the unique file identifier, UUID, assigned on upload.
/-/is a mandatory parsing delimiter to divide operations and other path components.
:operation/:params/is a CDN operation directive with parameters.
:filenameis an optional filename you can add after a trailing slash
You can stack two and more operations like this:
Your original filenames can be accessed via REST API.
Make a request to receive a JSON response with file parameters including
You can set an optional filename that users will see instead of the original name:
:filename should comply with file name conventions
and it should be a valid part of a URL. For example,
Here are some examples with full CDN URLs:
Safe: // adding a simple filename https://ucarecdn.com/85b5644f-e692-4855-9db0-8c5a83096e25/image.jpg // using a char allowed in the pchar definition https://firstname.lastname@example.org // allowed in pchar together with Image Transformations https://email@example.com // using a sub-delim allowed in pchar together with Image Transformations https://firstname.lastname@example.org // using percent-encoded gen-delims that are not allowed in pchar https://ucarecdn.com/85b5644f-e692-4855-9db0-8c5a83096e25/-/preview/-/grayscale/image%5Bdesaturated%5D@2x.jpg Unsafe: // using gen-delims that are not allowed in pchar without encoding https://ucarecdn.com/85b5644f-e692-4855-9db0-8c5a83096e25/-/preview/-/grayscale/image[desaturated]@2x.jpg
Groups are file collections. Use them to organize content in your Uploadcare project. A common use case is to use them in single content upload or delivery transactions.
:group_uuid is similar to a single file UUID, but it has the file number
at the end. A group can contain up to 1000 files.
A group URL will show a list of individual file URLs with their UUIDs, and index numbers in that group.
Request a specific file in a group by adding
i is a file index,
starting from 0:
Note, there is no
/-/ separator after a group UUID. It's required for
By the way, you can apply Image Transformations to indivitual files within a group:
You can also group the processed files with the respective operation sequences.
When you request a file by its group URL, it'll include all operations before
adding to that group. Adding more operations after
/-/ will apply them over
the existing ones.
Getting a group as an archive is done via the
archive group processing
The operation limits are:
- A total size of uncompressed files ≤ 2 GB.
- Processing operations will be discarded. Only original files will be archived.
Here's how to get an archived file group:
:group_uuid— UUID of a file group you want to get as an archive.
:format— the format of that output archive, we support
:filename(optional) — output archive filename.
Making a gallery is also based on a group processing operation,
Here’s how it works,
You can customize the layout and behavior of images in a gallery by adding Fotorama options to their URLs. The workflow is pretty much the same as with Image Transformations except for image size, dimensions, and ratio manipulations.
The most common use case with
gallery is to embed a collection of images into
your page via
<iframe src="/:group_uuid/gallery/-/nav/thumbs/-/fit/cover/-/loop/true/-/allowfullscreen/native/-/thumbwidth/100/" width="100%" height="450" allowfullscreen="true" frameborder="0"> </iframe>
By default, CDN instructs browsers to show images and download other file types.
inline control allows you to change this behavior.
Returns file-related information, such as image dimensions or geotagging data in the JSON format.
In the second option,
json response will contain the
original key with the
info on your original image.
Same as the example above, but it returns data as the
type. Callback name should always be
uploadcare_callback. It should receive
the two following arguments:
id and a response object. For original files,
id is na equivalent to their UUIDs. For processed files,
id is an equivalent
to their URLs, excluding the last operation,
In the first case
id will be
c5b7dd84-c0e2-48ff-babc-d23939f2c6b4, in the