You'd have to use a Worker to transform the paths, and you'd be paying for each request as a worker invocation, no easy way
If you could have cdn subdomain point to the same origin/host and have it accept the cdn subdomain as well, you could then just use a transform rule to rewrite the path and append /uploads to it