Akis Manolis
← Notes

1 MIN READ CODE

Rewriting a ten-year-old Firefox add-on

Image Search started in 2015 because nothing did quite what I wanted. Version 2 starts over on a modern extension.

Firefox right-click menu on a mountain lake photo with a "Search image with…" submenu listing All enabled providers, Google Lens, TinEye, Bing Visual Search, Yandex Images and SauceNAO
Right-click any image and pick a provider, or all of them at once.

I wrote Image Search in 2015: right-click an image, pick a search engine, see where else it appears or find a bigger copy. It was built on Firefox's Add-on SDK, which Firefox dropped years ago, and its list of engines had aged with it. People kept using it anyway, so this autumn I rewrote it.

Why it existed

Back then, reverse image search meant saving the image, opening a search engine and uploading it again, once for every engine you wanted to try. There were only a handful of add-ons that did it from the right-click menu, and none of them let me choose how the results opened: in a new tab in the background so I could keep reading, or in the foreground straight away. That one setting is the reason I wrote my own, and it is still there in version 2.

What changed

Version 2 is a Manifest V3 WebExtension, so one codebase now builds for Firefox and for Chromium browsers. The engine list is current: Google Lens, TinEye, Bing Visual Search, Yandex, SauceNAO and, for anime screenshots, trace.moe. You can search one or all of them at once.

It has no dependencies, asks only for the right-click menu and synced settings, and sends an image's address to a provider only when you choose that provider.

The odd parts

Instagram lays invisible elements over its photos, so the browser often doesn't know you right-clicked an image. A small script, which runs only there, finds the photo under the click.

Search engines also change their search pages without notice, so a weekly job on GitHub runs every provider against a public test image and flags the ones that start timing out or failing, before a user runs into it.