
內容簡介
### 總結:
Llama Shuffle 是一個輕量級效用外掛,可讓您從 WordPress 媒體庫或 URL 列表中提供隨機圖像。它設計為主機不可知,友善於人工智慧,簡單、快速和免費,沒有附加銷售、追蹤或外部服務。常見用途包括隨機標題或英雄圖像、促銷圖像輪播、人工智慧圖像參考工作流程和輕量級圖像洗牌。
### 問題與答案:
1. Llama Shuffle 外掛的設計目標為何?
- 答:主機不可知、友善於人工智慧、簡單、快速和免費,沒有附加銷售、追蹤或外部服務。
2. 外掛的常見用例有哪些?
- 答:包括隨機標題或英雄圖像、促銷圖像輪播、人工智慧圖像參考工作流程和輕量級圖像洗牌。
3. 外掛如何協助圖像分組?
- 答:圖像可以使用圖像集(自定義媒體庫分類)進行分組,或通過純文本 URL 列表提供。
4. 外掛支援哪些功能?
- 答:包括從媒體庫附件中選擇隨機圖像、通過圖像集分類圖像、選擇性的 URL 列表模式以及其他功能如快取控制、短代碼支援等。
5. 外掛的 REST API 如何運作?
- 答:使用 REST API 端點,例如 `/wp-json/llama-shuffle/v1/url?set=header`,可獲取直接圖像 URL,無需重定向,適用於自動化、腳本或人工智慧工作流程。
6. 如何在內容中顯示隨機圖像?
- 答:可以使用短代碼 `[llama_shuffle set="header" alt="Random image" class="my-class"]` 來顯示一個隨機圖像。
7. 外掛的開發者筆記提到了什麼重點?
- 答:外掛故意小而不依賴其他庫,避免基於文件擴展名的端點,並使用 REST API 端點作為建議的整合點。
外掛標籤
開發者團隊
② 後台搜尋「Llama Shuffle — by Barking Llama」→ 直接安裝(推薦)
原文外掛簡介
Llama Shuffle is a lightweight utility plugin that lets you serve a random image from your WordPress Media Library or a list of URLs.
It is designed to be:
* Host-agnostic (works on managed hosts like Pressable, WP Engine, Kinsta)
* AI-friendly (no redirects required when using the REST endpoint)
* Simple, fast, and free — no upsells, no tracking, no external services
Common use cases:
* Random header or hero images
* Promotional image rotation
* AI image reference workflows
* Lightweight image shuffling without sliders or page builders
Images can be grouped using Image Sets (a custom Media Library taxonomy), or supplied via a plain-text URL list.
Built by Barking Llama Designwerks.
Features
Random image selection from Media Library attachments
Image grouping via Image Sets taxonomy
Optional URL list mode (one URL per line)
Portable endpoint:
/llama-shuffle
/random-image (alias)
REST API endpoint (no redirects):
/wp-json/llama-shuffle/v1/url?set=header
Cache controls for performance
Shortcode support
No JavaScript required
No upsells, ads, or telemetry
How to Use
Media Library Mode (Recommended)
Go to Media → Library (List view works best)
Edit or bulk-edit images
Add one or more terms under Image Sets (for example: header, promo, seasonal)
Set the Default Set in plugin settings
Example endpoints:
/llama-shuffle
/llama-shuffle?set=header
/random-image?set=promo
REST API (Recommended for scripts & AI workflows)
GET /wp-json/llama-shuffle/v1/url?set=header
Response:
{
“set”: “header”,
“url”: “https://example.com/wp-content/uploads/2026/02/example.png”
}
URL List Mode
Switch Source Mode to URL List in settings and paste one image URL per line.
Optional section headers allow multiple pools:
[set:header]
https://example.com/a.jpg
https://example.com/b.jpg
[set:promo]
https://example.com/c.jpg
Shortcode
Display a random image in content:
[llama_shuffle set=”header” alt=”Random image” class=”my-class”]
Developer Notes
Llama Shuffle is intentionally small and dependency-free.
The plugin avoids file-extension-based endpoints (such as .jpg) to remain portable across managed WordPress hosts where static asset handling may bypass WordPress rewrites.
For automation, scripts, or AI workflows, the REST API endpoint is the recommended integration point:
GET /wp-json/llama-shuffle/v1/url?set={slug}
This endpoint returns a direct image URL without redirects and can be safely consumed by external services.
Image pools are implemented as a non-hierarchical attachment taxonomy (llama_image_set). This allows images to belong to multiple sets without duplication.
Candidate image IDs are cached using WordPress transients to reduce database load. Empty caches are automatically refreshed to avoid stale states.
The plugin does not enqueue scripts, register blocks, or add front-end assets. All output is server-side.
There are no external API calls, tracking scripts, or upgrade paths.
