Using Stock Image Search (Unsplash, Pixabay)
Learn how to automatically fetch professional stock photos for your featured images using integrated APIs. Pro feature only.
Overview
Stock Image Search automatically finds and downloads relevant, high-quality images from external sources when your content doesn't have images. Never publish a post without a featured image again.
Note: This is a Pro-only feature. Upgrade to Pro to access stock image search.
Supported Image Sources
Available Providers
| Provider | Library Size | License | API Required |
|---|---|---|---|
| Unsplash | 3M+ photos | Free to use | Yes (Free) |
| Pixabay | 2.7M+ images | Free for commercial | Yes (Free) |
Setting Up Stock Image Search
Prerequisites
Before you begin:
- [ ] Auto Featured Image Pro license active
- [ ] API key(s) from chosen provider(s)
- [ ] Basic understanding of API quotas/limits
Provider Setup Guides
1. Unsplash Setup
Step 1: Create Unsplash Account
- Visit https://unsplash.com/join
- Sign up (free)
- Verify email
Step 2: Register Your Application
- Go to https://unsplash.com/oauth/applications
- Click "New Application"
- Fill in application details:
Application Name: My WordPress Site Description: Auto Featured Image integration - Accept terms and conditions
- Click "Create Application"
Step 3: Get API Keys
- On application page, locate Keys section
- Copy Access Key (public key)
- Do not share Secret Key publicly
Step 4: Configure in Plugin
- Go to Auto Featured Image > Settings > External APIs tab
- Find the Unsplash API Access Key field
- Paste your Access Key
- Click Save Settings
2. Pixabay Setup
Step 1: Create Account
- Visit https://pixabay.com/accounts/register/
- Sign up (free)
- Verify email
Step 2: Get API Key
- Go to https://pixabay.com/api/docs/
- Scroll to "Search Images" section
- Your API key is displayed if logged in
- Copy the key
Step 3: Configure in Plugin
- Go to Auto Featured Image > Settings > External APIs tab
- Find the Pixabay API Key field
- Paste your API Key
- Click Save Settings
Search Settings
Keywords Optimization
Configuration:
☑ Clean search query
- Remove common words (the, a, an, how, to)
- Remove special characters
- Limit to 5 keywords
☑ Add category to search query
Example: "cameras" + "Photography" = "cameras photography"
Fallback keywords: photography, blog, articleAPI Priority Order
When multiple APIs are enabled:
When both Unsplash and Pixabay API keys are configured, the plugin will try each provider in order until an image is found. If no image is found from any provider, the plugin falls back to other generation methods (title-based or default image).
Image Filtering
Quality Filters
Minimum Dimensions:
Minimum Width: [800] px
Minimum Height: [600] px
☑ Reject images below minimumOrientation:
○ Any orientation
● Landscape (horizontal)
○ Portrait (vertical)
○ SquareImage Size:
Preferred size: Large / Medium / Small
File size limit: [5] MBContent Filters
Safe Search:
☑ Enable Safe Search
Filters adult content automaticallyImage Type:
☑ Photos only
☐ Illustrations
☐ Vector graphics
☐ ClipartColor Filters:
Preferred colors:
☐ Grayscale
☐ Transparent background
☑ Full color
☐ Specific color: [Color Picker]Attribution and Licensing
Understanding Licenses
Unsplash License
✓ Free to use ✓ Commercial use allowed ✓ No permission needed ✓ Attribution appreciated but not required
More info: Unsplash License
Pixabay License
✓ Free for commercial use ✓ No attribution required ✗ Cannot redistribute on stock sites ✗ Cannot sell unmodified copies
More info: Pixabay License
Automatic Attribution
Configuration:
Attribution Settings:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
☑ Add photographer credit
Location: Image Caption / Image Description
Format: Photo by [Name] on [Source]
☑ Add source link
Add to image description
☑ Track image source
Store in post meta for records
Example output:
"Photo by John Doe on Unsplash"Search Best Practices
1. Craft Effective Search Queries
Good Examples:
- "business meeting" → Clear, specific
- "woman working laptop" → Descriptive
- "sunset mountains" → Visual keywords
Bad Examples:
- "how to start a business" → Too wordy
- "the best" → Non-visual
- "click here" → Not descriptive
2. Use Fallbacks
Strategy:
Primary: Stock Image Search
Fallback 1: First Content Image
Fallback 2: Title-Generated Image
Fallback 3: Default ImageNever leave posts without images.
3. Monitor API Usage
Check Quotas Regularly:
Unsplash: 42 / 50 requests used this hour
Pixabay: 234 / 5000 requests used this hour
☑ Email alert when reaching 80% of limit4. Cache Search Results
Configuration:
☑ Enable search result caching
Cache duration: [7] days
Benefits:
- Faster repeated searches
- Reduces API calls
- Saves quotaTroubleshooting
Issue 1: No Images Found
Possible Causes:
❌ Search query too specific ❌ Filters too restrictive ❌ API quota exceeded ❌ Network/connectivity issue
Solutions:
1. Check API connection status
2. Broaden search query
- Use fewer keywords
- Remove filters temporarily
3. Check API quota/limits
4. Test with different provider
5. Review error logsIssue 2: Poor Image Relevance
Problem: Images don't match content
Solutions:
A. Improve Search Query
Bad: "Guide"
Good: "Business strategy guide"
Bad: "Tutorial"
Good: "WordPress tutorial coding"B. Use Custom Field
Add custom field to posts:
Field: featured_image_keyword
Value: "specific descriptive keywords"
Configure plugin to use custom fieldC. Manual Selection (Pro)
☑ Show search results preview
- View 10 options
- Select best match
- Confirm before settingIssue 3: API Key Errors
Error Messages:
"Invalid API key"
"Authentication failed"
"Unauthorized"Solutions:
Verify API key is correct
- No extra spaces
- Copy entire key
- Check expiration
Check API status
- Visit provider's status page
- Verify account is active
- Check account status
Regenerate API key
- Generate new key
- Update plugin settings
- Test connection
Issue 4: Rate Limit Exceeded
Error: "API rate limit exceeded"
Immediate Solutions:
1. Switch to different provider (priority order)
2. Wait for limit reset
3. Use cached results
4. Enable request throttlingLong-term Solutions:
1. Upgrade API plan (if available)
2. Distribute requests across multiple APIs
3. Process posts during off-peak hours
4. Use CRON scheduling to spread requestsAdvanced Features
Custom Search Parameters (Pro)
Per Provider Settings:
Unsplash:
Collections: [Collection IDs]
- Curated collections only
Orientation: Landscape
Color: Blue tonesPixabay:
Category: Nature, Travel, Business
Editorial: Yes / NoFallback Search Terms
Configuration:
If primary search fails, try:
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1. Post category name
2. First post tag
3. Generic term: "blog article"
4. Site name / brand term
Example flow:
Post title: "10 Tips for Success"
→ No results
→ Try category: "Business"
→ Found 150 images
→ Select best matchManual Selection Mode (Pro)
Enable Preview:
☑ Show image selection interface
- Display top 10 results
- User chooses best fit
- Quick selection interfaceWhen to use:
- High-priority posts
- Homepage featured content
- Strict brand guidelines
- Specific visual needs
Performance Optimization
Reduce API Calls
Strategies:
Use Caching
- Cache for 7-30 days
- Reduce duplicate searches
Batch Processing
- Process posts during off-hours
- Use CRON scheduling
Smart Fallbacks
- Try content images first
- Use stock search as last resort
Pre-fetch for Categories
- Cache common category searches
- Reuse for similar content
Cost Management
Free Tier Usage
Unsplash: 50 requests/hour
Daily capacity: ~1,200 posts
Monthly capacity: ~36,000 posts
Cost: FREEPixabay: 5,000 requests/hour
Daily capacity: ~120,000 posts
Monthly capacity: Unlimited (within hourly)
Cost: FREERelated Articles
- Quick Start Guide
- Settings Explained: Complete Reference
- Free vs Pro: Feature Comparison
- Generating Featured Images from Post Content
- SEO Best Practices for Auto-Generated Images
Last Updated: February 2026 Difficulty Level: Intermediate Estimated Reading Time: 18 minutes
