JPG on R2 served with wrong content type


I recently migrated a lot of images from AWS to R2 and then connected a custom domain. However for some reason, all JPG images show Content-Type: application/octet-stream instead of Content-Type: image/jpeg like before.

This is causing a lot of cache misses with Cloudflare. How can I fix this issue and have the correct content type?

This is the response:

HTTP/1.1 200 OK
Content-Type: application/octet-stream
Last-Modified: Wed, 01 Mar 2023 11:07:15 GMT
Report-To: {“endpoints”:[{“url”:“”}],“group”:“cf-nel”,“max_age”:604800}
Cache-Control: max-age=31536000
Date: Wed, 15 Mar 2023 20:56:49 GMT
Content-Length: 14424
Connection: keep-alive
ETag: “908dbbdab1794abb4c3f60c5cdae9ccc”
Accept-Ranges: bytes
Vary: Accept-Encoding
NEL: {“success_fraction”:0,“report_to”:“cf-nel”,“max_age”:604800}
Server: Cloudflare
CF-Cache-Status: MISS
CF-RAY: 7a87aa49f9703752-MXP

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.