
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeI completely understand the urgency of this situation - having your users unable to download audiobooks is a critical issue. Let me help you troubleshoot this systematically.
Based on your symptoms (references suddenly not resolving, missing CDN URLs in illustration objects), the most probable cause is related to how your Sanity client is configured, particularly around API versioning.
If you weren't explicitly setting an apiVersion in your Sanity client configuration, your application may have started defaulting to a newer API version. Sanity uses a date-based API versioning system, and when no version is specified, the behavior can change when new versions are released.
The most recent API version (v2025-02-19, released February 24, 2025) includes a significant change: the default perspective switched from raw to published. Depending on when you're experiencing this issue, this could be relevant - but regardless, the principle remains the same for any API version change.
Option 1: Explicitly lock to a stable API version (fastest way to restore service):
const client = createClient({
projectId: 'your-project-id',
dataset: 'your-dataset',
apiVersion: '2024-05-01', // or another stable date you know worked
useCdn: true,
})Option 2: Explicitly set the perspective to raw:
const client = createClient({
projectId: 'your-project-id',
dataset: 'your-dataset',
apiVersion: '2024-05-01', // use a specific version
perspective: 'raw', // explicitly request all content including drafts
useCdn: true,
})Check your illustration documents' publish status: In Sanity Studio, verify that all referenced illustration documents are actually published (not just saved as drafts). If your queries are now using a published perspective, they won't resolve references to draft-only documents.
Verify your GROQ query structure: Make sure your query properly dereferences the asset reference. A working query should look something like:
*[_type == "audiobook"] {
title,
illustrations[]-> {
_id,
title,
asset-> {
_id,
url
}
}
}Check all client instances: Verify that ALL places where you instantiate Sanity clients (frontend, backend, iOS app, Android app) have the same configuration. An inconsistency here could explain why it's affecting all platforms.
Review Sanity's status page: Visit status.sanity.io to check for any ongoing service incidents or outages.
Inspect the actual data structure: Use Sanity's Vision plugin in your Studio to run your query and see exactly what data structure is being returned. This will help confirm whether the issue is with the query, the data structure, or the client configuration.
The Image Pipeline serves images through cdn.sanity.io URLs that are constructed from asset references. When references don't resolve properly, the asset object (which contains the url field) won't be included in your query results. This typically happens when:
->)apiVersion to all your Sanity client configurationsapiVersion is explicitly set going forward to prevent automatic upgradesThe fix should be a quick configuration change that you can deploy across all platforms. Since you mentioned this is affecting both production and staging identically, and you haven't changed anything on your side, this strongly suggests an API version or configuration issue rather than a code bug.
Please try these fixes and let me know if this resolves the issue. If not, share your GROQ query and client configuration (with sensitive data removed) so we can dig deeper!
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.
Content operations
Content backend


The only platform powering content operations
By Industry


Tecovas strengthens their customer connections
Build and Share

Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag store