
Grab your gear: The official Sanity swag store
Read Grab your gear: The official Sanity swag storeSanity Studio doesn't automatically generate thumbnails for PDF files the way it does for images. This is a feature you'll need to implement yourself using a separate backend or service.
Here's what's happening and your options:
Out of the box:
file field type, Sanity stores it as-is with metadata like filename, size, and MIME type, but doesn't generate preview thumbnailsCommon approaches for PDF thumbnails:
Custom asset source plugin - Create a Studio plugin that intercepts PDF uploads, generates a thumbnail (first page as an image), and stores both the PDF and thumbnail. You'd typically use a service like:
pdf-lib or pdf-popplerPost-processing with webhooks or Functions - Use Sanity Functions to listen for file upload events, generate thumbnails server-side, and store the thumbnail URL back in your document. Functions are the modern, recommended approach since they're serverless compute built directly into Sanity.
Client-side rendering - Use a browser-based PDF renderer like pdf.js to generate thumbnails on-demand in your frontend application
Hybrid approach - Store PDFs in Sanity but use a separate document type that includes both a file field (for the PDF) and an image field (for a manually uploaded or programmatically generated thumbnail)
The reason Sanity doesn't do this automatically is that PDF processing is computationally expensive and use cases vary widely (which page to preview, resolution needed, etc.). Most teams end up building custom solutions that fit their specific needs.
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