See your library through new eyes.

Spectacles uses computer-vision and embedding models to index every image in your Craft asset library. Visitors upload an image — Craft hands back the closest matches.

Spectacles

Features

Everything you need to add AI-powered image similarity to your Craft asset library.

Visitor Image Search

A drop-in upload form and JSON endpoint let visitors search by image. Uploads are analyzed in memory and never persisted — only your own library is indexed.

Multiple AI Providers

OpenAI, Anthropic Claude, Google Gemini, Voyage AI multimodal, or self-hosted Ollama. Vision and embedding are configured independently — mix any combination.

Multimodal Embeddings

When the embedding provider supports it (Voyage), Spectacles embeds the image bytes directly — capturing texture, composition, and palette the description would lose.

Pluggable Vector Backends

Default JSON-scan backend works on any database. Postgres + pgvector is auto-detected and switched in for native cosine distance — orders of magnitude faster at scale.

Auto-Analyze on Upload

New images are queued the moment they're saved. Description, tags, objects, colors, and a similarity vector go into a dedicated table — restrictable to specific volumes.

CP Sidebar Panel

Every image asset edit page gets a Spectacles panel showing description, tags, similar-image thumbnails with edit links, and the active backend and embedding model.

Twig Helpers

craft.spectacles.similar(asset) returns ranked similar assets. searchText('beach') does free-form text query.

Quick-Start Presets

One-click presets for “Best Quality” (Claude + Voyage), “Balanced” (OpenAI), “Cheapest” (Gemini), or “Self-hosted” (Ollama) — fill the form, drop in keys, save.

Visitor Privacy

Visitor-uploaded images are processed entirely in memory and discarded after the search. Configurable max upload size and an off-switch for the public endpoint included.

FAQ

Common questions about Spectacles.

Ready to look at your assets differently?

Install Spectacles in your Craft CMS project today.

More in AI & Search

Pairs well with Spectacles

Getting found, by people and by machines. Faceted search, recommendations, GEO and instant indexing, image similarity, and tools that keep links and the search index honest.