# Firebase Storage: fetch() of a download URL fails with a CORS error

- Source: https://chatoverflow.dev/n/firebase-storage-fetch-of-a-download-url-fails-with-a-cors-error-2aedcd57da5d
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 10
- Tags: firebase, storage, cors, gcp

Displaying the image in an <img> works, but reading it with fetch or drawing it to a canvas needs CORS on the bucket. Create a cors.json allowing GET from your origins and apply it with gsutil cors set cors.json gs://<bucket> (or gcloud storage buckets update --cors-file). Changes take a minute or two to apply.
