DEV Community

s t
s t

Posted on

Telegram's WhatsApp import drops your photos: why it happens and how to fix it

You exported a WhatsApp chat, imported it into Telegram, and the text arrived. Every photo, video and voice message turned into a line of text like <attached: IMG-20231104-WA0007.jpg>. The memories are gone and only placeholders remain.

You did nothing wrong, and your export is fine. This is a known Telegram bug that has been open for over a year on Telegram's own tracker (bugs.telegram.org/c/49513), with the same complaint in other bug threads, r/Telegram and Superuser. The text transfers and the media is silently skipped.

This post explains why it happens, and how to import a WhatsApp chat into Telegram with the original dates and the media actually attached: photos, videos, voice messages, round video notes and stickers.

Why the import loses your media

A WhatsApp export is a .zip (or folder) containing a _chat.txt transcript plus the media files. Inside the transcript each media item is only a reference, such as IMG-20231104-WA0007.jpg (file attached). The bytes live in separate image, video and audio files next to the transcript.

Telegram's history import is a multi-step flow. The client is supposed to initialize the import, upload each referenced media file, then finalize so the server stitches the media back onto the right messages. From what I can tell, the problem is in the middle step: the text arrives, but the media never gets uploaded, so the server never receives the files and every attachment stays a text stub. Telegram has not confirmed the exact cause. This is my reading of the API flow, not an official statement.

In one sentence: the media is in your export, but the app's import never gets it to Telegram's servers. Nothing you change on the WhatsApp side fixes that.

The fix: do the media upload step yourself

Telegram exposes an official history-import API with the three calls the app is meant to use:

  1. messages.initHistoryImport starts the import for a chat.
  2. messages.uploadImportedMedia uploads each photo, video, voice note, round video and sticker. This is the step that appears to be missing from the app's import.
  3. messages.startHistoryImport finalizes, so the server attaches every file to the correct message and keeps the original send dates.

tg-import is a small Windows tool I wrote that drives all three calls. It reads a WhatsApp export (.zip or folder) or a Telegram Desktop export (result.json), matches each <attached: ...> reference to its real file, and performs the upload step properly.

What it does:

  • Transfers photos, videos, voice messages, round video notes and stickers instead of placeholders.
  • Preserves original dates (see the 1:1 limit below).
  • Has a dry-run preview (--dry) that shows what will be imported with no login and no upload.
  • Resumes after a crash instead of re-uploading everything.
  • Uploads in batches and handles Telegram's flood limits.
  • Ships as a single Windows .exe, so there is no Python to install.

How to use it

  1. Export your chat. In WhatsApp open the chat, choose Export chat, then Include media. (Or export from Telegram Desktop as result.json.)
  2. Create a free api_id / api_hash at my.telegram.org. These are your own credentials and nothing is sent to a third party.
  3. Preview first. Run tg-import with --dry to see every message and media file it will import.
  4. Run the import against a private 1:1 chat. It does the init, upload and start sequence, batches uploads, and resumes if interrupted.
  5. Check the chat. Your media is there on the original dates, with Telegram's small "Imported" label.

Limits you should know before you try it

  • Original dates only land correctly in a private 1:1 chat. This is a Telegram server limitation, not a tool bug. Importing into a group or channel will not place messages on their original dates.
  • Bulk import through the user API is a gray area under Telegram's Terms of Service. tg-import uses your own account and credentials, so it is your account and your own risk. The tool paces requests for flood limits, but it cannot remove the ToS question. If that risk is not acceptable to you, this is not the right tool.
  • You supply your own api_id and api_hash. They are free from my.telegram.org.

Get it

tg-import costs $9 on Gumroad. Run the --dry preview first: no login, no upload.

Disclosure: I am the author of tg-import.

Top comments (0)