Original image

Is there a way to get the original image with the original filename and extension from cloudflare images in 2024?

Or the only way is to duplicate them in R2/S3?

you can use the combination of 2:

  1. preserve file name/extension in the path Upload via custom path · Cloudflare Image Optimization docs
  2. get original using this API Cloudflare API Documentation

It still doesn’t do exactly what I mean

This API requires to apply auth headers to the request, but in my case my users need to be able to get the original image they uploaded themselves(without my account credentials)

you didn’t mention this, though.

in that case, there are a few options:

  1. you can either use workers and return originals through it doing auth/z by yourself if needed.

  2. Instead of using built-in Images storage, I advise to look into R2 + Image Transformations integration. You’d also need to user workers, to either return resized images or originals.

1 Like

Thanks, I’ll look into that

1 Like