Overview
Upload history provides:Persistent Storage
Up to 20 uploads saved in browser localStorage, surviving browser restarts.
Cross-Studio Access
Upload history is shared between Image Studio and Video Studio — upload once, use everywhere.
Fast Thumbnails
80×80px thumbnails generated client-side for instant preview in the picker.
No Re-Upload
Select previously uploaded images instantly without waiting for upload.
How It Works
Upload Flow
User Selects Image
You choose an image from your device using the upload button in Image Studio or Video Studio.
Upload to Muapi.ai
The image uploads to Muapi.ai via
POST /api/v1/upload_file (multipart/form-data) and returns a hosted URL.Generate Thumbnail
While uploading, a thumbnail is generated client-side:
- Renders image to a 80×80px HTML canvas
- Center-crops to square
- Exports as base64 JPEG (60% quality)
- Stores ~2-5KB per thumbnail
Save to History
The upload entry is saved to browser localStorage:The history is capped at 20 uploads (oldest entries are removed when exceeding).
Storage Location
All upload history is stored in browser localStorage under the key:- Persistent — Survives browser restarts
- Local — Never sent to any server (except the image URLs, which point to Muapi.ai)
- Private — Only accessible by this origin (your local or hosted app)
- Limited — ~5-10MB total localStorage limit (varies by browser)
Using Upload History
Accessing the Picker
Click Upload Button
Click the upload button (📤 icon) in the prompt bar to open the reference image picker.
View History
The picker shows all previously uploaded images in a 3-column grid with thumbnails.If you haven’t uploaded anything yet, you’ll see an empty state:
📤 No uploads yet
Picker UI Elements
- Header
- Image Grid
- Bottom Bar (Multi-Mode)
Left Side:
- Title: “Reference Images”
- Hint (multi-mode only): “Select up to X images”
- “Upload new” button (single-mode) or “Upload files” button (multi-mode)
- “Done (X)” button (multi-mode, when images selected)
Managing History
Removing Images
Hover Over Image
Hover over any thumbnail to reveal the delete button (✕) in the bottom-right corner.
Clearing All History
There’s no built-in “clear all” button, but you can manually clear history via browser console:Technical Details
Storage Schema
Each upload entry in localStorage follows this structure:Thumbnail Generation
Thumbnails are generated using HTML5 Canvas API:- Load image file as Object URL
- Draw to 80×80px canvas with center-crop
- Export as base64 JPEG at 60% quality
- Store in localStorage (~2-5KB per thumbnail)
Storage Limits
Browser localStorage limits vary:- Most browsers: ~5-10MB per origin
- Chrome/Edge: 10MB
- Firefox: 10MB
- Safari: 5MB
If localStorage fills up, older uploads are removed first (FIFO). You can manually increase the limit by reducing
MAX_UPLOADS in src/lib/uploadHistory.js.Cross-Studio Integration
Shared History
Upload history is shared between Image Studio and Video Studio because:- Both studios use the same
createUploadPicker()component - Both access the same localStorage key (
muapi_uploads) - Both upload to the same Muapi.ai endpoint
- Upload an image in Image Studio for image-to-image editing
- Switch to Video Studio
- Click upload button — the same image appears in history
- Select it to animate as a start frame for image-to-video
Cinema Studio
Cinema Studio does not use upload history because it’s a text-to-image-only workflow (no reference images).Use Cases
Iterating on a Reference Image
Iterating on a Reference Image
Upload a reference image once, then experiment with different:
- Models (Nano Banana Edit, Flux Kontext, Seededit, etc.)
- Prompts (“make it a painting”, “remove background”, “upscale 4x”)
- Settings (aspect ratio, quality, resolution)
Cross-Studio Workflows
Cross-Studio Workflows
- Upload a portrait in Image Studio
- Edit it with Nano Banana 2 Edit (change background)
- Download the result
- Switch to Video Studio
- Select the edited image from history
- Animate it with Kling I2V
Multi-Image Experiments
Multi-Image Experiments
Upload 10-14 images once, then try different combinations:
- Select images 1, 3, 5 for one generation
- Select images 2, 4, 6 for another
- Reorder images to test priority effects
Style Reference Library
Style Reference Library
Build a library of style references:
- Upload 20 favorite art styles, textures, or color palettes
- Use them across sessions for consistent style transfer
- Mix and match with new content images
Best Practices
Organizing Your History
Organizing Your History
- Remove unused images — Keep history clean by deleting old/unused uploads
- Re-upload important images — If you clear history, important images will need re-uploading
- Use descriptive filenames — Filenames are shown in tooltips (hover over thumbnails)
Storage Management
Storage Management
- Stay under 20 uploads — The limit prevents localStorage bloat
- Clear periodically — Remove old uploads you no longer need
- Backup URLs — If you have important hosted URLs, save them elsewhere (they remain valid even if removed from history)
Privacy & Security
Privacy & Security
- Hosted images are public — Muapi.ai URLs are publicly accessible (no authentication required)
- Don’t upload sensitive images — Uploaded images may be accessible by anyone with the URL
- Clear history before sharing — If you share your browser or demo the app, clear upload history first
API Reference
getUploadHistory()
Returns the full upload history array from localStorage.
saveUpload(entry)
Saves a new upload entry to history (prepends to array, keeps last 20).
removeUpload(id)
Removes an upload entry by ID.
generateThumbnail(file)
Generates a 80×80px base64 thumbnail from a File object.
Troubleshooting
Upload history empty after browser restart
Upload history empty after browser restart
Cause: localStorage was cleared by browser or userSolution:
- Check if browser is in private/incognito mode (localStorage is session-only)
- Re-upload images to rebuild history
- Ensure browser allows localStorage for your origin
Thumbnails not loading
Thumbnails not loading
Cause: Corrupt base64 data or invalid data URISolution:
- Clear upload history and re-upload images
- Check browser console for errors
- Ensure images are valid formats (JPEG, PNG, WebP)
Can't remove images from history
Can't remove images from history
Cause: Click handler not working or localStorage read-onlySolution:
- Check browser console for JavaScript errors
- Try clearing history manually via console:
localStorage.removeItem('muapi_uploads')
History limit reached
History limit reached
Cause: 20 uploads stored, no more roomSolution:
- Remove old uploads to make room for new ones
- Or increase
MAX_UPLOADSinsrc/lib/uploadHistory.js(not recommended without testing)
Related Features
Multi-Image Input
Use multiple images from history in a single generation
Image Studio
Image-to-image editing with reference images
Video Studio
Image-to-video animation with start frames
