One of the most common questions that comes up when building apps on Vercel is: “How can I implement image upload when there’s no persistent storage?”
Unlike a traditional server, Vercel doesn’t allow you to keep files on disk or store uploads in the project directory. Still, plenty of real-world services built on Vercel support image uploads without issues. The key is understanding how these uploads are processed and why “non-persistent handling” works surprisingly well.
This article summarizes the practical approach based on experience building lightweight image-processing tools in production.
You don’t store the image — you process it and discard it
The biggest misconception is that image upload == image storage.
On Vercel, the recommended pattern is different:
Receive → Process → Return → Discard
Vercel’s serverless functions start with a clean environment every time, which means you cannot rely on saving files to disk. But you can accept the file in memory, perform the necessary processing (e.g., AI generation, background replacement, resizing), and simply return the output to the browser.
This workflow is lightweight, secure, and extremely well-suited for apps where images are only needed temporarily — especially AI-related tools.
The actual flow for handling an upload on Vercel
Even without storage, the upload pipeline is straightforward.
Here’s the typical end-to-end process:
- The user selects an image via
<input type="file"> - The browser sends the file to
/api/generateasFormData - The API route receives the file as a
Fileobject - Convert it into
ArrayBuffer → Bufferin memory - Pass the buffer directly to an external service (AI API, image processor, etc.)
- Receive the generated image from that service
- Return the generated file as the response, without storing anything
On the frontend, the resulting image is displayed using:
URL.createObjectURL(blob)
This makes the whole process feel like a native app, even though no persistence exists on the server.
When you do need persistence, use external storage
Some apps require users to access images later — for example, galleries or user accounts.
In those cases, you would integrate:
- Vercel Blob (official storage)
- Supabase Storage
- Cloudinary
- Firebase Storage
- Any S3-compatible service
But the important point is:
For most generative tools, you don’t need to save input images at all.
Temporary processing is enough, and it significantly reduces infrastructure complexity and privacy concerns.
The real design question is not “How to store?” but “Do we store at all?”
Once you reframe the requirement this way, Vercel’s limitations stop being limitations.
If you only need to:
- accept an image
- process it
- return the result
- and throw away the input
…then Vercel is more than capable.
This pattern is exactly why so many AI-powered image tools run on Vercel today.
In my own projects, shifting to this “no-storage pipeline” drastically simplified development and made the service faster and more reliable. Users also appreciate that their images are not stored anywhere — a meaningful advantage when dealing with personal data.
Summary
Even without a database or filesystem, Vercel can handle image uploads perfectly well. The key is treating the upload as temporary data, not persistent storage. Process the file in memory, pass it to your external image engine, return the generated result, and let the temporary buffer disappear.
Only when you truly need to keep files should you integrate an external storage solution.