Browser extension for Chromium and Firefox that translates text in images using OCR and swaps the image source directly on the page.
Translate pair: auto -> ru (auto-detected source language to Russian).
- Adds a context menu action on images: Toggle image translate.
- Runs OCR + translation through Yandex endpoints (via
ya-ocr). - Toggles translated/original image on repeated clicks.
- Caches translated results by image URL in memory for faster repeated use.
- Right-click an image and choose Toggle image translate.
- Background script sends the image URL to OCR client.
- Returned translated SVG is converted to a
data:image/svg+xml;base64,...URL. - Content script replaces every matching
<img>element on the page. - Repeating the action restores the original image.
Availability: If the Store listing is unavailable, the extension is still being reviewed by the store. Please try again later.
bun installStart extension development build:
bun run devStart Firefox development build:
bun run dev:firefoxBuild production package:
bun run buildBuild for Firefox:
bun run build:firefoxThe unpacked builds are written to .output/chrome-mv3 and .output/firefox-mv2, respectively. Load .output/chrome-mv3 as an unpacked extension in a Chromium browser, or load .output/firefox-mv2/manifest.json as a temporary add-on in Firefox.
Create ZIP package:
bun run zipCreate Firefox ZIP package:
bun run zip:firefoxZIP archives are written to .output/.
bun run compileThe extension requests:
contextMenusto add image context action.activeTabandscriptingto inject content script on demand.declarativeNetRequestto adjust request headers for OCR/translate endpoints.host_permissions: ["<all_urls>"]to work on any site.
src/
entrypoints/
background.ts # context menu + OCR request + toggle message
content.ts # image replacement and restore logic
utils/
fetch.ts # declarativeNetRequest session rule
messaging.ts # typed message protocol between scripts
file:, anddata:image URLs cannot be submitted for translation; images already translated by the extension can still be restored.- The translated-image cache lasts only for the current background-script lifetime.
- Translation quality depends on source image quality and OCR recognition.
- WXT for extension development/build.
- TypeScript.
@webext-core/messagingfor typed extension messaging.ya-ocrclient for OCR + translation requests.
