You can serve private images by using signed URL tokens. When an image requires a signed URL, the image cannot be accessed without a token unless it is being requested for a variant set to always allow public access.
Copy your key and use it to generate an expiring tokenized URL.
The example below uses a Worker that takes in a regular URL without a signed token and returns a tokenized URL that expires after one day. You can, however, set this expiration period to whatever you need, by changing the const EXPIRATION value.
Was this helpful?
What did you like?
What went wrong?
Thank you for helping improve Cloudflare's documentation!