Issue with images disappearing in Safari, resolved by restarting Safari and Warp.

7 replies
Last updated: Apr 23, 2024
hi all, sorry if someone already explained what to do but half of my images vanished from media and are presented only as empty rectangle with file name. I have restarted server etc. but nothing changed. ;( Im on CLI 3.37.0
AI Update

I'm sorry to hear you're experiencing this issue with images appearing as empty rectangles! This is definitely frustrating, but it's often a browser-related problem rather than an actual data loss issue.

The most common fix: Force quit and restart your browser

Based on similar reports in the Sanity community, this issue is frequently caused by browser caching problems, particularly in Safari. The solution that has worked for others:

  1. Force quit your browser completely (don't just close the window)
    • On macOS: Command + Option + Esc, select your browser, click "Force Quit"
    • Or right-click the browser icon in the Dock and choose "Force Quit"
  2. If you're using a terminal like Warp, restart that too
  3. Reopen your browser and Studio

This often immediately resolves the empty rectangle issue because it clears problematic cached data that was preventing images from rendering properly.

Try a different browser

If the restart doesn't help, test your Studio in Chrome or Firefox. If images appear fine there, it confirms this is a Safari-specific display issue rather than missing data.

Update your Sanity packages

While your CLI version is 3.37.0, it's worth ensuring your Studio packages are up to date. Run:

npm install sanity@latest

You can also use:

npx -y sanity@latest upgrade

This updates your sanity package and related dependencies to their latest compatible versions based on your package.json.

Check your browser console

Open your browser's Developer Tools (Command + Option + I on macOS) and look at the Console tab for any error messages when the Studio loads. This can reveal if there are network issues, CORS errors, or problems loading from cdn.sanity.io.

Important: Your images likely aren't actually gone

The fact that you can see filenames suggests the asset references still exist in your content. This is almost certainly a display/rendering issue rather than data loss. The images are still in your Content Lake; your browser is just having trouble rendering them.

If none of these steps work, I'd recommend reaching out on the Sanity community Slack with details about which browser/version you're using and any console errors you're seeing. The community is very helpful with these kinds of issues!

πŸ‘‹ What version of the Studio and the Media Plugin are you running?
App "@sanity/client": "^6.15.11"
Sanity Studio
"sanity-plugin-media": "^2.2.5",
....
I have now checked studio and website in Chrome and all seems to be fine. The issue is in Safari but until yesterday all worked without any issue. I didn't changed anything it just happened. πŸ€·β€β™‚οΈ
Ah, it seems like Safari changed something, then. Do you have any errors in your console? Safari often has issues serving our images.
Actually it was on my side as I had issue even with Warp. I have forced Safari and Warp to quit and restart and all seem to be fine now. Anyway thank you for fast responses ;)
Excellent!

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?