Discussion of a bug with nested fields in the Image schema type in Sanity.io
I understand this frustrating issue! This sounds like a UI state bug in Sanity Studio v2 where the edit button for image fields with nested fields (like alt text, credits, etc.) disappears after re-uploading the image multiple times, and only reappears after a page refresh.
First, I need to mention something important: you're running @sanity/base: ^2.30.1, which is Studio v2. Studio v2 support officially ended on December 7, 2023, meaning no further bug fixes or security patches are being released for this version.
Why this happens:
This is typically a state management issue in the v2 Studio where the image input component doesn't properly update its internal state after the asset reference changes during re-upload. The component gets stuck thinking it's still in "uploading" or "processing" mode and hides the edit button accordingly. Since the page refresh fixes it, this confirms it's a component state issue rather than a data problem.
Your options:
Upgrade to Studio v3/v4 (Recommended) - This is really your best path forward. Studio v3 was completely rewritten and many of these UI state management issues from v2 were resolved. The migration guide is straightforward, and your image schema with nested fields will work the same way. You'll move from the
@sanity/basepackage structure to a singlesanitypackage.Try the latest v2 version - If you absolutely must stay on v2 temporarily, you could try upgrading to the very last v2 release to see if any late bug fixes addressed this, though it's unlikely since v2 only received critical fixes after v3 launched.
Temporary workaround - You could build a custom image input component that forces a re-render after upload, but this is really just a band-aid and not worth the effort given that v2 is no longer supported.
Bottom line: Since Studio v2 is deprecated and unsupported, bugs like this won't be fixed. Your best move is to plan a migration to the current Studio version where this issue doesn't exist. Many community members experienced various UI state issues like this in v2, which was one of the driving reasons for the v3 rewrite.
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.