I faced the same issue when I was using Cloudflare R2 — uploads were extremely slow. After checking the code, I realized that the images were first being uploaded to our own server, then thumbnails were generated, and only after that were all the files pushed to R2.
Yes, I found this behavior in the core/media code. Since my project is a modified version, I edited the media handling and configured it to upload directly to R2 instead of going through the server first.
The next issue was how to handle thumbnails, since R2 doesn’t provide them directly. To solve this, I used Cloudflare’s image resizing service. I updated the code so that existing functions continued to work, but now the image retrieval logic points to Cloudflare’s resizing endpoint.
I think this approach (or something similar) should ideally be implemented for proper R2 integration.
Presigned Upload System
Generate Presigned URL
Server generates a presigned URL for direct R2 upload
Response includes: upload_url, file_path, expires_in
Direct Upload to Cloudflare R2
Smart Image URL Generation (R2 + Cloudflare Resizing)
Cloudflare’s /cdn-cgi/image/ is used for resizing and optimized delivery
Examples
Original: 
Resized: https://your-r2-domain.com/cdn-cgi/image/width=300,height=200/user-folder/image.jpg
I can share the code if you need it.