| 开发者 |
SH4LIN
akrocks vishalkakadiya |
|---|---|
| 更新时间 | 2026年6月2日 15:32 |
| PHP版本: | 8.0 及以上 |
| WordPress版本: | 7.0 |
| 版权: | GPLv2 or later |
| 版权网址: | 版权信息 |
[snopix_search] shortcode for
the front end.[snopix_search] widget (variant, title, result cap)./wp-json/snopix/v1/ with rate limiting on the public search
endpoint.image/jpeg, image/png, image/gif, image/webp, image/bmp.
Where data lives
Snopix creates a single custom table, {prefix}snopix_index, that stores one
row per indexed attachment with its three fingerprints. Uninstalling the
plugin drops the table unless you disable Drop data on uninstall in
settings.
snopix folder to /wp-content/plugins/ (or install the
zip via Plugins → Add New → Upload Plugin).[snopix_search]
Optional attributes: variant (card, inline, or narrow; default
card), title (header label; default "Search by image"), and max_results
(1-48; default 12). For example:
[snopix_search variant="inline" max_results="24"]
The block editor also exposes these options via a Snopix Search panel on
the core Shortcode block.
By default the endpoint is open to anyone. Restrict it to logged-in users
from the Settings tab in Media → Snopix.JPEG, PNG, GIF, WebP, and BMP. Other types (SVG, HEIC, AVIF) are rejected at upload time by the indexer and again at the search endpoint.
The fingerprint table stores one compact row per attachment, so the storage cost is small. Indexing scales linearly with the number of attachments. The bulk indexer runs in chained WP-Cron batches so it does not time out, but indexing a very large library (10k+) will take many minutes.
The indexer needs to read raw bytes via PHP-GD. If your offload plugin keeps a local copy until indexing is complete, you are fine. If files are removed from the local filesystem before the indexer runs, those attachments will be skipped.
The composite score combines pHash + colour + edge histograms with weights 0.40 / 0.35 / 0.25. In our internal test matrix, format conversions, resizing, and JPEG re-compression are recovered with > 0.95 similarity. Heavy Gaussian blur, extreme downscale (sub-128 px), and noise-corrupted images sit closer to the 0.85 threshold and may not always rank first. Tuning is ongoing.
Both rely on the same fingerprints. Search returns ranked matches for an arbitrary probe image; duplicate detection clusters indexed images among themselves and surfaces every group with two or more visually-identical members.
Snopix is built for single-site installs. It creates one
{prefix}snopix_index table per site and is not network-activation aware, so
activate it on each site individually rather than network-wide.
Deactivate, then delete the plugin from the Plugins screen. When the
Drop data on uninstall setting is enabled (the default), the uninstall
hook drops {prefix}snopix_index and removes all plugin options and
transients; disable it first if you want the index to survive a reinstall.
readonly properties that broke activation on PHP 8.0 (the declared minimum version).[snopix_search] shortcode.