Visual Image Search — Plugin Documentation

Overview & Features

What the plugin does and what's included out of the box

📷 Multiple Input Methods

Drag & drop, file browser, rear-facing camera capture, clipboard paste (Ctrl/Cmd+V), and URL-based image input.

🤖 AI Similarity Matching

CLIP vector embeddings, cosine similarity, and multi-signal scoring combining color, texture, shape, and semantic labels.

✂️ Image Cropping

Powered by Cropper.js — users can select a specific region before searching, improving accuracy on complex scenes.

⚡ Find Similar Button

Auto-injected "Find Similar" icon on every product card in the shop loop and on individual product pages.

🎭 3 Modal Styles

Choose between fullscreen, popup, or slide-panel presentation for the search interface.

♾️ Infinite Scroll

Seamless result loading with skeleton loading states —

📊 Analytics Dashboard

Search logs, fallback tracking, result counts, timing metrics, and a full admin analytics panel.

🔌 REST API

4 documented endpoints for headless storefronts, mobile apps, or custom integrations — fully authenticated.

Installation

Getting the plugin running on your WooCommerce store

⚠️

WooCommerce Required. This plugin requires WooCommerce 6.0 or later and PHP 7.4+. It will not activate without WooCommerce present.

Step-by-step
1. Upload plugin folder → /wp-content/plugins/advanced-image-search/ 2. Activate through Plugins menu in WordPress admin 3. Navigate to Image Search → Settings and enter your license key 4. Choose your AI provider and enter the required API key (if applicable) 5. Go to Image Search → Dashboard and click "Re-index All Products" 6. Add [image_search] shortcode to any page to enable search
ℹ️

Background Indexing. On activation the plugin schedules two cron jobs: qsis_background_index (hourly, picks up new products automatically) and qsis_cleanup_temp (daily, purges expired uploads). Both are removed on deactivation.

{ }

Shortcodes

All four shortcodes — paste any of these into a page or post

[image_search] Full visual search page with uploader, controls, and results +

The complete search experience in one shortcode. Renders the image upload area, camera/paste/URL inputs, optional image cropper, search controls (keyword refinement, category filter), and the live results grid with Add to Cart. This is the main shortcode for a dedicated "Search by Image" page.

Attributes
AttributeTypeDefaultDescription
titlestring"Search by Image"Heading text shown above the search interface
columnsnumber4Number of product columns in the results grid
stylefull / compact / minimalfullLayout density — full shows all controls, compact condenses the UI, minimal hides secondary options
Example
[image_search title="Find by Photo" columns="3" style="full"]
[image_search_results] Live AJAX results grid only — no uploader, no controls +

Renders only the results container and pagination — no upload UI. Useful when you want to embed results into an existing page layout alongside your own uploader widget or a custom trigger. Results populate via AJAX when a search is performed on the same page.

Attributes
AttributeTypeDefaultDescription
columnsnumber4Number of product columns in the grid
per_pagenumber12How many results to load per page / per infinite-scroll batch
Example
[image_search_results columns="3" per_page="9"]
💡

Place [image_search_uploader] and [image_search_results] on the same page to build a split layout — upload zone on the left, results on the right.

[image_search_uploader] Standalone drag-drop, camera, paste, and URL uploader widget +

The upload interface without the results grid. Includes drag-and-drop, file browse, rear-camera capture, clipboard paste, and URL input — whichever methods are enabled in Settings. When an image is submitted, results appear via AJAX in a co-located [image_search_results] or in the global modal.

Attributes
AttributeTypeDefaultDescription
compactyes / nonoRender a condensed single-line uploader suitable for embedding in a header or sidebar
Examples
[image_search_uploader] [image_search_uploader compact="yes"]
[image_search_admin] Frontend admin panel — restricted to users with shop manager capability +

Embeds the admin dashboard panel on any frontend page. Visitors and regular customers see a permission-denied message. Only users with the manage_woocommerce capability can view the panel — typically administrators and shop managers.

⚠️

Place this shortcode on a password-protected or members-only page to avoid exposing the permission-denied message to the public unnecessarily.

Example
[image_search_admin]
📄

Page Examples

Ready-to-use shortcode combinations for common page layouts

🔍

Dedicated Search Page

Page: "Search by Image"

The simplest setup — drop the full shortcode on a new page. All upload methods, cropping, category filter, and results are included in one block.

Shortcode
[image_search columns="4" style="full"]
🖼️

Split Layout — Uploader + Results

Elementor / Block Editor

Place both shortcodes in a two-column layout block. The uploader fires AJAX and populates the results grid beside it — no page reload.

Left column
[image_search_uploader]
Right column
[image_search_results columns="3" per_page="9"]

Compact Header Embed

Widget area / Header template

A minimal upload button that triggers the global modal — suitable for a site header or sidebar widget alongside the standard keyword search bar.

Shortcode
[image_search_uploader compact="yes"]
🛡️

Admin Control Panel

Page: "Image Search Admin"

A private page for shop managers to view index status, trigger re-indexing, and access search analytics without going to wp-admin.

Shortcode
[image_search_admin]

REST API

Four endpoints for headless storefronts, mobile apps, and custom integrations

ℹ️

All endpoints are under the /wp-json/qsis/v1/ namespace. Requests require a valid WordPress nonce (X-WP-Nonce header) or an Application Password for external clients.

POST /wp-json/qsis/v1/search Search by image upload or URL +

The primary search endpoint. Accepts a multipart image file upload or a public image URL, runs it through the configured AI provider, and returns a ranked list of matching WooCommerce products.

Request body (multipart/form-data or JSON)
FieldTypeRequiredDescription
imagefileOne ofImage file upload (JPEG, PNG, or WebP)
image_urlstringOne ofPublic URL of an image to search with
category_idnumberNoRestrict results to a WooCommerce category
keywordsstringNoOptional keyword refinement layered on top of image matching
per_pagenumberNoResults to return (max controlled by Settings)
Response
{ "products": [ { "id": 42, "name": "...", "score": 0.87, "price": "...", "image": "..." } ], "total": 18, "labels": ["sneaker", "white", "leather"], "provider": "clip_api", "cached": false }
GET /wp-json/qsis/v1/similar/{id} Find products similar to a given product +

Pass any WooCommerce product ID to retrieve visually similar products based on that product's already-indexed embedding. Powers the "Find Similar" button on product pages.

URL Parameters
ParamTypeDescription
{id}numberWooCommerce product post ID
per_pagenumber(query string) Number of results to return
Example request
GET /wp-json/qsis/v1/similar/42?per_page=8
GET /wp-json/qsis/v1/status Index status and plugin configuration +

Returns the current index status, total products, indexed count, AI provider in use, and key configuration flags. Useful for monitoring or external dashboards.

Example response
{ "total_products": 340, "indexed": 338, "provider": "builtin", "license": "valid", "cache_enabled": true, "last_index_run": "2025-04-12 14:30:00" }
GET /wp-json/qsis/v1/categories Available WooCommerce product categories +

Returns the list of product categories that can be used as a filter parameter when calling /search. Populate a category dropdown in your custom frontend with this.

Example response
[ { "id": 15, "name": "Shoes", "slug": "shoes", "count": 84 }, ... ]
🧠

AI Providers

Choose the matching engine that fits your budget and accuracy needs

ProviderAPI KeyEmbedding TypeBest For
Built-in None Color histogram + texture + shape feature hash Free stores, basic matching without external services
CLIP API Optional (self-hosted) Real 512-dim CLIP/ViT vectors — cosine similarity Best accuracy. Ideal when you run a CLIP service (e.g. Jina, self-hosted)
Google Vision Required Object labels + feature hash Object-heavy catalogs (furniture, tools, food)
OpenAI Vision Required Semantic description + feature hash (gpt-4o-mini) Fashion, materials, lifestyle products
💡

Similarity weights are adjustable. In Settings → Similarity you can tune the contribution of each signal — Embedding (default 40%), Color (25%), Labels (20%), Texture (10%), Shape (5%) — to optimize for your specific product catalog.

⚙️

Settings Reference

All configurable options under Image Search → Settings

General
SettingDefaultDescription
Plugin EnabledyesMaster switch — disabling stops all frontend output without deactivating
Search ScopeproductsWhat to search: products, posts, or custom
Primary Color#FF6A00Accent color used throughout the plugin UI — set via :root { --qsis }
Upload & Input
SettingDefaultDescription
Max Upload Size10 MBMaximum file size for image uploads
Allowed Typesjpg, jpeg, png, webpAccepted image MIME types
Enable CroppingyesShow Cropper.js region-selection step before searching
Enable CamerayesEnable rear-facing camera capture (required for FAB)
Enable URL InputyesAllow searching by pasting an image URL
Enable PasteyesAllow Ctrl/Cmd+V clipboard image paste
Results Display
SettingDefaultDescription
Results Per Page12Products shown per page or per infinite-scroll batch
Max Results24Hard cap on total results returned per search
Show Similarity ScoreyesDisplay match percentage badge on each product card
Show Add to CartyesAJAX Add to Cart button directly on results
Show Price / RatingyesShow product price and star rating in results
Infinite ScrollyesLoad more results as the user scrolls
Skeleton LoadingyesShow animated placeholder cards while results load
Modal Stylefullscreenfullscreen, popup, or slide
Find Similar ButtonyesAuto-inject "Find Similar" icon on shop loop and product pages
Search Bar Camera IconyesAuto-inject camera icon into the WooCommerce search bar
Similarity & Matching
SettingDefaultDescription
Similarity Threshold25%Minimum match score to include a product in results
Category BoostyesBoost products whose category matches AI-detected labels
Embedding Weight40%Contribution of vector embedding similarity to the final score
Color Weight25%Contribution of color histogram matching
Labels Weight20%Contribution of AI-detected label similarity
Texture Weight10%Contribution of texture analysis
Shape Weight5%Contribution of shape matching
Performance & Caching
SettingDefaultDescription
Cache ResultsyesDatabase-backed cache — identical searches skip reprocessing
Cache TTL3600 sHow long a cached result is valid (seconds)
Rate Limit30 / minMax search requests per IP per minute
Lazy Load ImagesyesLazy-load product images in the results grid
Analytics
SettingDefaultDescription
Log SearchesyesRecord each search (type, labels, result count, timing, fallbacks)
Log Retention90 daysHow long search logs are kept before auto-deletion

Custom Triggers

Open the search modal or camera from any element on your site

The plugin uses document-level click delegation, meaning you can attach trigger classes to any HTML element — buttons, links, images, divs — and the JS will respond automatically. No extra JavaScript required.

.qsis-modal-trigger Opens the search modal (uploader + results) +

Add this class to any clickable element to open the visual search modal. On mobile it opens the full modal with all input options; on desktop it opens based on your Modal Style setting (fullscreen, popup, or slide).

Examples
Visual Search Visual Search
.qsis-camera-trigger Opens the fullscreen camera directly, skipping the modal +

Add this class to open the fullscreen camera capture screen directly, without going through the modal first. After capture, the photo is automatically submitted for search. Requires Enable Camera to be on in Settings.

ℹ️

This is the same trigger used internally by the FAB button. You can use it to create your own branded camera button anywhere on the page.

Examples
.qsis-cam-trigger Search-bar camera icon — mobile opens camera, desktop opens modal +

The smart search-bar variant. On mobile it opens the fullscreen camera; on desktop it opens the search modal. This is what the plugin auto-injects into the WooCommerce search bar when Search Bar Camera Icon is enabled — you can also use it manually in a custom search bar.

Example — custom search bar
.qsis-similar-icon Triggers a "Find Similar" search for a specific product by ID +

Add this class plus a data-id attribute with a WooCommerce product ID to trigger a visual similarity search for that specific product. Opens the modal and loads results automatically. This is what the plugin injects on shop loop cards — you can use it in custom layouts too.

Required attribute
AttributeTypeDescription
data-idnumberWooCommerce product post ID to search visually similar products for
Example

JavaScript API

Two global functions are exposed on window for use in custom scripts or inline onclick handlers.

FunctionDescription
window.qsisInit()Re-initialises event binding. Call this if you inject modal HTML into the DOM after page load (e.g. from a page builder or AJAX).
window.qsisOpenCamera()Programmatically opens the fullscreen camera screen. Equivalent to clicking a .qsis-camera-trigger element.
Inline onclick usage

JavaScript Event

After every search the plugin fires a jQuery event on document you can hook into for custom integrations (analytics, Elementor, third-party grids).

jQuery event hook
$(document).on('qsis:results', function(e, data, productIds, isAppend) { // data — full response object (results, labels, colors, pages) // productIds — flat array of matched product IDs in score order // isAppend — true when this is a "load more" / infinite scroll batch console.log('Matched product IDs:', productIds); });
💡

The qsis:results event is how the Elementor integration works internally — it receives the product IDs and redirects with ?qsis_product_ids=… to filter the Loop Grid. You can use the same event to drive any custom product grid.

Body State Class

While the modal or camera is open, the plugin adds qsis-overlay-open to . Use this to hide or show other elements during an active search session.

CSS example — hide a chat widget when search is open
body.qsis-overlay-open .my-chat-widget { display: none !important; }
📍

Floating Action Button (FAB)

A persistent camera button that floats over your shop pages

The FAB is a floating camera icon that sits in the corner of the screen and opens the visual search modal on tap. It requires both FAB Enabled and Enable Camera to be turned on in Settings.

FAB Settings
SettingValuesDefaultDescription
FAB Enabledyes / noyesShow or hide the floating button globally
FAB Pagesall / shop_product / shop / product / customshop_productWhich pages the FAB appears on — shop_product covers all archive and single product pages
Custom PagesstringComma-separated page IDs, slugs, or WC keywords (shop, cart, checkout) when FAB Pages is set to custom
FAB Positionbottom-right / bottom-left / bottom-centerbottom-rightCorner or edge where the button anchors
Offset Xpixels24Distance from the horizontal edge in pixels
Offset Ypixels24Distance from the bottom edge in pixels
💡

Set FAB Pages → custom and enter specific page IDs separated by commas to show the FAB only on hand-picked pages (e.g. a custom landing page or collection page outside the normal WooCommerce structure).

Elementor Integration

Use visual search results to drive an Elementor Loop Grid widget

Instead of rendering results in the plugin's own grid, you can route matched product IDs into an existing Elementor Loop Grid (or Posts widget) on the same page. This lets you use Elementor's skin system for full design control over the result cards.

Setup Steps

Step-by-step
1. In Elementor, add a Loop Grid / Posts widget to your search results page. 2. In the widget's Query settings, set the Query Type to "Custom" and enter "qsis_visual_search" as the Custom Query ID. 3. In Image Search → Settings → Results Display, set Result Target to "elementor" and enter the widget's CSS ID in "Elementor Grid ID". 4. When a search runs, the plugin redirects with ?qsis_product_ids=1,2,3 and the Loop Grid automatically filters to those products in score order.
ℹ️

The qsis_visual_search custom query hook intercepts both the Elementor query callback and the main WP_Query for the page, preserving the similarity score order via orderby: post__in. You can also pass a custom CSS selector via Result Target → custom_selector if you're using a non-Elementor product grid.

🗄

Product Indexing

How product images are processed and stored for fast matching

Before visual search can work, each product's images must be processed and their feature vectors stored in the plugin's database tables. This is called "indexing".

🔄 Auto-Indexing

When enabled, new or updated products are automatically queued and processed. The background cron runs hourly in batches.

🖼️ Gallery Support

When Index Gallery is enabled, all gallery images are indexed alongside the main product image — not just the featured image.

🔀 Variation Support

Variation images can be indexed separately so that color/pattern variants appear correctly in results.

📦 Batch Size

Default batch is 10 products per cron run. Increase on high-memory servers or decrease if you hit timeouts.

Database Tables

TableContents
qsis_embeddingsVector embeddings per image — up to 512 dimensions depending on provider
qsis_product_mapMaps product IDs to their embedding IDs, image type (main / gallery / variation)
qsis_search_logFull search analytics: input type, detected labels, result count, timing, fallback flags
qsis_search_cacheCached search results with TTL, hit counter, and filter-awareness flags
⚠️

Re-indexing clears existing data. Use the "Re-index All Products" button in the admin Dashboard only when changing AI providers or after bulk-importing products. The background indexer handles routine updates without clearing.

🔑

License

Activating and managing your plugin license

A valid license is required for all functional features (search, indexing, REST API, FAB). The Settings and License pages are accessible without activation so you can always enter or update your key.

StateWhat's available
No license / InvalidSettings page, license activation form. All search features disabled. Admin notice shown.
Valid licenseAll features — indexer, search, REST API, frontend shortcodes, FAB, analytics.
ℹ️

Enter your license key at Image Search → Settings → License. License validity is checked periodically via a scheduled cron event (qsis_license_check).

Are you sure you want to logout?

Quick actions
Chat with us
Call support
Submit ticket
Browse by topic
👤
My Account
3 articles
💳
Payments
3 articles
📦
Orders
2 articles
↩️
Returns & Refunds
2 articles
⚠️
Disputes
1 articles
🔗
Integrations
1 articles
💬
General
0 articles
Popular articles

Support center Support

Tell us who you are so we can personalise your experience.

Or skip and chat as guest

SA
Firm Bot
Checking...
📞
Hi! Welcome to support. How can I help you today?
Just now
↓ New messages
Ready to connect
SA
Support Team
In-platform voice call
Checking queue...
Mute
Speaker
Hold
Chat

Login required

Please log in to submit a support ticket so we can link it to your account and keep you updated.

Log in to continue
👤My Account3 articles
How to reset your account password
Updating your account information
Two-factor authentication setup
💳Payments3 articles
Accepted payment methods
Payment failed – what to do
Transaction limits and fees
📦Orders2 articles
How to track your order
Cancelling an order
↩️Returns & Refunds2 articles
Refund policy and timelines
How to initiate a return
⚠️Disputes1 articles
How we handle chargebacks
🔗Integrations1 articles
Connect your account to Zapier
💬General0 articles

Can't find what you're looking for?

By proceeding you agree to our Terms and Conditions, Privacy and Cookies policies.