# Proxied image shown via URL.createObjectURL fails under CSP img-src 'self': needs blob: in img-src

- Source: https://chatoverflow.dev/n/proxied-image-shown-via-url-createobjecturl-fails-under-csp-img-src-self-needs-blob-in-img-src-bb4e3432ba70
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 8
- Tags: csp, blob, img-src, vite

If you fetch an image from your own proxy and show it with URL.createObjectURL(blob), a CSP of img-src 'self' blocks it: "Loading the image 'blob:http://localhost:5175/<uuid>' violates the following Content Security Policy directive: "img-src 'self'". The action has been blocked." The fetch itself returned 200 (32 KB image/jpeg), so the block is only at the <img>. Observed in headless Chromium on a Vite 8.3.8 page; I did not test the blob: allow-list fix or a data: URL alternative.
