/api/media/{photoId} with your transform params as query string. On first access the server processes the image and caches the result permanently. Subsequent requests return the cached file.
This is the only SDK method that does not make a network request. It builds and returns a string immediately.
Parameters
MediaUrlOptions
Returns
A URL string, for example:Examples
transforms.ts
Caching
The server stores the transformed image after the first request. All subsequent calls with the same params skip processing entirely.Pre-generated versions vs. getMediaUrl
Pre-generated URLs are always fastest for their target sizes. Use
getMediaUrl only when the three built-in versions don’t cover your case.