π Quick Start Guide - Product Images
1οΈβ£ Setup (5 minutes)β
Get Vercel Blob Tokenβ
- Go to Vercel Dashboard
- Select your project
- Click Storage β Blob
- Click Create Store (if you don't have one)
- Copy the
BLOB_READ_WRITE_TOKEN
Add to Environmentβ
# Add to your .env file
BLOB_READ_WRITE_TOKEN=vercel_blob_xxx...
Deploy Changes (if already deployed)β
# Rebuild to apply new configuration
npm run build
# Or push to trigger Vercel deployment
git add .
git commit -m "Add product image management"
git push origin main
2οΈβ£ Usage (2 minutes)β
Add Images to Productsβ
-
Go to Admin β
/admin/inventory -
For New Products:
- Click "Add Product"
- Fill in name, price, quantity
- Click "Add Product"
- Click "Edit" on the newly created product
- Now you can upload images
-
For Existing Products:
- Click "Edit" on any product
- Scroll to "Product Images" section
- Click "Upload Image"
- Select image file (JPEG, PNG, WebP, or GIF)
- Wait for upload to complete
- Edit alt text for accessibility
- Upload more images as needed
- Click "Set Primary" to change main display image
-
View in Shop β
/shop- Images automatically appear on product cards
- Optimized for all devices
- Fast loading with Next.js optimization
3οΈβ£ Best Practicesβ
Image Requirementsβ
- Format: JPEG or WebP for photos, PNG for graphics
- Size: Max 5MB per file
- Dimensions: 1600-2000px on longest side recommended
- Quality: Upload high-quality, Next.js will optimize
Recommended Workflowβ
- β Prepare images before uploading (crop, enhance)
- β Upload master/hero image first (auto-set as primary)
- β Add descriptive alt text for each image
- β Add multiple angles/views for better presentation
- β Set best photo as primary for shop display
Alt Text Tipsβ
- Describe what's in the image
- Keep it concise (150 chars or less)
- Don't start with "Image of..." or "Picture of..."
- Example: "Red cricket bat with leather grip and willow wood"
π― That's It!β
Your product images are now:
- β Stored securely in Vercel Blob
- β Optimized automatically by Next.js
- β Delivered fast from edge network
- β Responsive for all devices
- β Accessible with alt text
π Troubleshootingβ
"Upload failed"β
- Check file size (< 5MB)
- Verify file type (JPEG, PNG, WebP, GIF)
- Ensure BLOB_READ_WRITE_TOKEN is set
"Images not showing"β
- Hard refresh browser (Cmd+Shift+R or Ctrl+Shift+R)
- Check browser console for errors
- Verify token is set correctly
"Upload button disabled"β
- Make sure you're editing an existing product
- Can't upload to new products before saving
π More Infoβ
- Detailed setup:
IMAGE_SETUP.md - Implementation details:
IMPLEMENTATION_SUMMARY.md - Need help? Check console for error messages
Happy uploading! πΈβ¨