Skip to main content

OCR image spam detection in Telm: text inside pictures

How Telm reads text inside images, recognises known spam banners and decodes QR codes so image-only spam is caught as fast as plain text.

6 min read
In short

Spammers moved from text to pictures because plain keyword bots are blind to them. Telm checks every image three ways at once: a perceptual hash recognises known spam banners even after resizing or recolouring, OCR reads the text printed inside the picture, and a QR decoder extracts hidden links and phone numbers. Text pulled out of an image runs through the same anti-spam rules as normal messages, so a casino banner with a QR code is removed just as fast as a text advert.

Image handling lives in Content filters; text inside pictures is read automatically.

Want to set this up? Do it right in your Telm account.

Open in your dashboard

1Why spam hides inside pictures

A classic keyword filter only looks at message text, so spammers put their offer in an image instead: a casino banner, an investment screenshot, a QR code that leads to a scam channel. To a naive bot the message looks empty and harmless.

Telm treats an image as content to be read, not an opaque attachment. Every photo is inspected while the rest of the checks run, so image spam is stopped on the same pass as text spam.

2How Telm reads text inside an image

OCR (optical character recognition) turns the letters printed on a picture back into text. Telm reads with the Tesseract engine, tuned for the languages your community actually speaks.

Once the text is extracted, an unusually text-heavy image is treated as a likely advert, and the recovered words are fed through your normal spam rules. If those rules match, the picture is scored just like a text message that said the same thing.

  • Multi-language reading out of the box — English and Russian by default, plus German, French, Spanish and CJK (Chinese, Japanese, Korean).
  • A text-heavy image (a lot of printed words at good confidence) is itself a spam signal.
  • Recovered text is re-checked against the full rule library, so hidden offers inside banners are caught.
  • Results are remembered by image fingerprint, so the same picture is never processed twice.

3Three checks on every image

OCR is one of three checks that run together on each picture. Between them they cover reused banners, printed text and encoded links.

  • Perceptual hash — recognises a known spam banner even after it has been resized, cropped or recoloured. A picture flagged as spam in one group is recognised across all groups.
  • OCR — reads the text printed inside the image and runs it through the spam rules.
  • QR decoder — extracts links (including t.me, wa.me and telegram.me) and phone numbers hidden in a QR code, and flags suspicious targets.
The spam-image database is global: once a banner is marked as spam in any protected group, Telm knows it everywhere. See how spam detection works for the full pipeline.

4When AI vision steps in

The fast checks above settle most images on their own. For the genuine grey zone — a picture that is neither an obvious known banner nor obviously clean — Telm can escalate to an AI vision model that describes what the image actually shows.

This deeper look is reserved for those borderline cases, so it steps in only when the quicker signals are inconclusive.

Perceptual hashing, OCR and QR decoding run on every plan as part of the core engine. The AI vision escalation is part of AI moderation, available on Pro and Business.

5What you control

Smart image detection needs no setup — it is on as soon as the bot is enforcing. If your community should not post pictures at all, you can also apply a blunt block that deletes every image regardless of content.

The two approaches are independent: smart detection removes spammy images while letting normal photos through; the blunt filter removes all images. Most groups want only the smart detection.

  • Smart detection (hash + OCR + QR) — keeps real photos, removes image spam. On by default.
  • Block all images — a hard filter for text-only communities. See content filters.
Was this article helpful?

Ready to protect your group?

Add Telm to your Telegram group and let it handle the spam.