29 lines
2.0 KiB
Markdown
29 lines
2.0 KiB
Markdown
## Why
|
|
|
|
ClawFort currently defaults to Picsum for article imagery, which returns random photos unrelated to article content. This undermines user trust and content quality. The existing MCP endpoint infrastructure supports pluggable image providers but lacks configuration for relevance-focused services. Connecting to curated royalty-free image APIs (Pixabay, Unsplash, Pexels) will deliver contextually relevant images that match article topics.
|
|
|
|
## What Changes
|
|
|
|
- Integrate MCP-based image providers (Pixabay, Unsplash, Pexels) that support keyword-based search for relevant royalty-free images.
|
|
- Implement a provider priority chain with automatic fallback when primary providers fail or return no results.
|
|
- Refine search query construction to improve image relevance (keyword extraction, query normalization).
|
|
- Add provider-specific attribution handling to comply with license requirements.
|
|
- Document configuration for each supported MCP image provider.
|
|
|
|
## Capabilities
|
|
|
|
### New Capabilities
|
|
- `mcp-image-provider-integration`: Configure and connect to MCP-based image services (Pixabay, Unsplash, Pexels) for keyword-driven image retrieval.
|
|
- `image-provider-fallback-chain`: Define provider priority and fallback behavior when primary sources fail or return empty results.
|
|
- `image-query-refinement`: Extract and normalize search keywords from article content to improve image relevance.
|
|
|
|
### Modified Capabilities
|
|
- `fetch_royalty_free_image`: Extend existing function to support multiple MCP providers with fallback logic and refined query handling.
|
|
|
|
## Impact
|
|
|
|
- **Backend/Image Service:** `backend/news_service.py` image retrieval logic gains multi-provider support and query refinement.
|
|
- **Configuration:** `backend/config.py` adds provider priority list and per-provider API key variables.
|
|
- **Documentation:** `README.md` environment variable table expands with new provider configuration options.
|
|
- **Operations:** Image quality and relevance improve without frontend changes; existing shimmer/lazy-load behavior remains intact.
|