All checks were successful
Deploy to Production / deploy (push) Successful in 1m49s
- Added new Stock Photos tab in Media Library for searching and importing Unsplash photos - Implemented search functionality with preview thumbnails and attribution info - Added one-click import feature to save photos directly to user's library - Created detailed setup documentation (STOCK_PHOTOS_QUICK_START.md and STOCK_PHOTOS_SETUP.md) - Added UNSPLASH_ACCESS_KEY configuration to .env.example - Enhanced MediaLibrary component with tabs,
92 lines
2.0 KiB
Markdown
92 lines
2.0 KiB
Markdown
# Stock Photos - Quick Start
|
|
|
|
## ✅ What's New
|
|
|
|
Your Media Library now has a **Stock Photos** tab that lets you search and import free photos from Unsplash!
|
|
|
|
## 🚀 Setup (5 minutes)
|
|
|
|
### 1. Get Unsplash API Key
|
|
|
|
1. Go to https://unsplash.com/developers
|
|
2. Sign up/login → "New Application"
|
|
3. Accept terms → Fill in details
|
|
4. Copy your **Access Key**
|
|
|
|
### 2. Add to .env
|
|
|
|
```bash
|
|
# Add this line to your .env file
|
|
UNSPLASH_ACCESS_KEY=your_access_key_here
|
|
```
|
|
|
|
### 3. Restart (already done!)
|
|
|
|
```bash
|
|
docker-compose restart api
|
|
```
|
|
|
|
## 📸 How to Use
|
|
|
|
### In the Media Library:
|
|
|
|
1. **Click "Stock Photos" tab**
|
|
2. **Search** (e.g., "mountain sunset", "office desk")
|
|
3. **Click "Import to Library"** on any photo
|
|
4. **Done!** Photo appears in "My Library" tab
|
|
|
|
### Then use it like any uploaded photo:
|
|
- Insert into content
|
|
- Set as feature image
|
|
- Copy URL
|
|
- Delete if needed
|
|
|
|
## 💡 Search Tips
|
|
|
|
**Good searches:**
|
|
- `coffee cup workspace`
|
|
- `mountain landscape sunset`
|
|
- `modern office interior`
|
|
- `person working laptop`
|
|
- `food photography minimal`
|
|
|
|
**Be specific:**
|
|
- ✅ "laptop on wooden desk"
|
|
- ❌ "laptop"
|
|
|
|
## ⚠️ Important
|
|
|
|
### Attribution
|
|
Photos show photographer name with link. Consider adding credit in image captions when publishing.
|
|
|
|
### Rate Limits
|
|
- **Free tier**: 50 requests/hour
|
|
- **Production**: 5,000 requests/hour (requires approval)
|
|
|
|
## 🎯 Benefits
|
|
|
|
- ✅ **No manual download** - One-click import
|
|
- ✅ **High quality** - Professional photos
|
|
- ✅ **Free to use** - Unsplash license
|
|
- ✅ **Millions of photos** - Huge library
|
|
- ✅ **Proper attribution** - Automatic credits
|
|
|
|
## 🔧 Troubleshooting
|
|
|
|
**"Unsplash API key not configured"**
|
|
→ Add `UNSPLASH_ACCESS_KEY` to `.env` and restart
|
|
|
|
**"Failed to search"**
|
|
→ Check API key, verify it's valid
|
|
|
|
**"Rate limit exceeded"**
|
|
→ Wait an hour or request production access
|
|
|
|
## 📚 More Info
|
|
|
|
See `STOCK_PHOTOS_SETUP.md` for detailed documentation.
|
|
|
|
---
|
|
|
|
**Ready to use!** Go to Assets → Media Library → Stock Photos tab 🎉
|