Opened 2 months ago
Closed 7 weeks ago
#64868 closed defect (bug) (duplicate)
Image previews in grid mode Media page and side panel for selected image blocks in post editor broken due to CORS errors
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Awaiting Review | Priority: | normal |
| Severity: | normal | Version: | trunk |
| Component: | Media | Keywords: | needs-patch |
| Focuses: | Cc: |
Description
In WordPress 7.0-beta5 image previews in the Media page's grid mode, and when selecting images for an Image Gallery block are broken when using a plugin such as WP Offload Media to offload media to cloud storage.
The Media Library images that have their URLs rewritten via filters from local URLs to their bucket or CDN URLs, no longer load as presumably there is a JavaScript fetch or similar that is not specifying mode: "no-cors", and therefore the browser blocks access.
The same problem happens when adding an image block to a post where the image is offloaded, and the image preview seen in the side panel when selecting the image block shows a "broken image" thumbnail instead of the expected tiny image preview.
These CORS errors and broken image thumbnails are going to affect many thousands of sites, some of which may have millions of images being served via a CDN.
Asking people to update the CORS policy for millions of objects in their buckets to relax the CORS policy to "*" or set a dedicated domain or multiple domains should a site have many, does not seem like a reasonable workaround.
The fix for the later #64886 ticket has seemingly fixed this.