Vibe Coding's Biggest Problem: Image and Video Upload with ImageKit
Beto, October 14, 2026 · 5,517 views
Building an application with media uploads is easier than ever with AI, but handling images and videos properly remains tricky. This video shows how to upload and manage media in React Native and Expo using ImageKit. You’ll see how to upload assets directly from the app, customize images per platform, and apply advanced AI edits like background removal and adding logos or text overlays.
I demonstrate setting up ImageKit, integrating Expo Image Picker, and creating API routes with Expo Router to securely upload files. The video also covers image transformations, AI-powered background edits, and video streaming with overlays, all optimized for mobile and web.
What's inside
- Building an application with media upload
- Setting up ImageKit and environment variables
- Using Expo Image Picker for selecting images and videos
- Creating secure API routes with Expo Router and ImageKit Node.js SDK
- Uploading images and videos from the app to ImageKit
- Applying image transformations and AI background removal
- Adding text overlays to videos and streaming with HLS
- Cross-platform support and optimization for web, iOS, and Android
Building an application with media upload
The video starts with a simple e-commerce app prototype that uses placeholder images. The goal is to allow users to upload product images and videos directly from the app. Handling media uploads is a common challenge, especially deciding where to store and how to deliver optimized versions for different platforms.
I show how to integrate Expo Image Picker to let users select images or videos. This sets the foundation for uploading media assets to a cloud service, which in this case is ImageKit. The app demo includes selecting a product, picking media, and preparing for upload.
Setting up ImageKit and environment variables
ImageKit is a cloud service for storing, transforming, and delivering images and videos. After creating an account, you get access to a media library and developer options. You configure an endpoint path (like "cwb") and obtain public and private keys.
I explain how to store these keys securely in a file. The private key is never exposed to the client; instead, uploads are handled server-side using Expo Router API routes. This setup ensures security and flexibility for media management.
Using Expo Image Picker for selecting images and videos
Expo Image Picker is installed with . It provides a native UI for users to pick images or videos from their device. I use AI (Claude) to help implement the integration quickly.
The picker supports both photos and videos, enabling users to upload different media types. After selection, the app shows the chosen file and prepares it for upload to ImageKit.
Creating secure API routes with Expo Router and ImageKit Node.js SDK
To keep the private key secure, uploads are handled on the server using Expo Router API routes. ImageKit provides a Node.js SDK, installed with .
I demonstrate creating a POST API route that extracts form data, uploads the file to ImageKit using , and returns a success response. This server-side approach keeps credentials safe and separates upload logic from the client.
Uploading images and videos from the app to ImageKit
The app calls the new API route to upload selected media. I show handling upload states and error fixes, such as setting in to enable server-side code.
Once uploaded, media appears in the ImageKit media library under the configured folder. The app then uses the uploaded file paths to display real product images and videos instead of placeholders. This flow works on mobile and web thanks to Expo.
Applying image transformations and AI background removal
ImageKit supports image transformations via URL parameters. I show how to create multiple variants of a product image (full, close-up, background removed) by applying transformations dynamically.
The AI-powered background removal is in beta but produces high-quality results. You can also generate new backgrounds by passing text prompts, creating completely different looks from a single original image. These transformations optimize images per platform and use free tier credits.
Adding text overlays to videos and streaming with HLS
Video uploads are similar to images. ImageKit’s video API lets you add overlays like text or logos directly on the video stream. I demonstrate adding a "Made by Beto" text layer that is baked into the delivered video URL, not a React Native component.
For streaming, I show how to generate an HLS manifest URL for adaptive streaming on iOS and Android. Web uses MP4 fallback since Chrome needs extra libraries for HLS. This setup delivers optimized, branded videos with overlays and adaptive quality.
Cross-platform support and optimization for web, iOS, and Android
The entire solution works seamlessly across platforms. Images and videos load quickly and look great on iOS, Android, and web. Expo Video is used for native video playback.
ImageKit’s transformations and streaming optimize media delivery based on platform capabilities. This approach simplifies media handling in React Native apps while providing advanced AI-powered editing and streaming features.
Resources

CourseReact Native course
Fundamentals through shipping: the concepts behind the prompts, with lifetime access.

PlatanoShip a launch-ready React Native app this weekend
See media upload and transformations in a real production template with payments and store assets wired up.

NewsletterReact Native and Expo Tips
Get practical tips and updates on React Native, Expo, and media handling delivered to your inbox.
Like this article? Get the rest of the library plus weekly React Native tips. Free.