Image Widget
Displays a background image from one of several sources: a custom URL, Bing Image of the Day, NASA Astronomy Picture of the Day, or Unsplash.
Configuration
| Key | Type | Default | Description |
|---|---|---|---|
source | string | "bing" | Image source: "custom", "bing", "nasa", "unsplash" |
customUrl | string | — | URL to use when source is "custom" |
nasaApiKey | string | "DEMO_KEY" | NASA API key (optional, demo key has rate limits) |
unsplashAccessKey | string | — | Unsplash access key (required for Unsplash source) |
count | number | 1 | Number of images to fetch (max 8); cycles through them |
interval | number | 0 | Seconds between image changes (0 = no auto-cycle) |
fit | string | "cover" | CSS object-fit: "cover", "contain", "fill" |
Getting API keys
NASA (optional): Register at api.nasa.gov for a free key. The DEMO_KEY works but has lower rate limits (30 requests/hour).
Unsplash: Create an app at unsplash.com/developers and copy the Access Key.
Bing: No key required.
Notes
- Images are fetched server-side to avoid CORS issues
- NASA APOD only returns images on days when the featured media is a photo (not a video); the widget skips video days automatically