Tdesktop: Image preview is not working for images hosted on my server

Created on 29 Aug 2017  路  6Comments  路  Source: telegramdesktop/tdesktop

Steps to reproduce

  1. When I paste an image URL to input field of telegram Desktop, I can see a preview for it immediately. (e.g http://media.farsnews.com/media/Uploaded/Files/Images/1396/06/07/13960607001150_PhotoB.jpg)
  2. But when I paste an image URL hosted on my server, telegram doesn't show any preview. (e.g http://84.241.52.6:8092/inojoom-pics/file_3.jpg) While i can see this image in browser.
  3. Should I do any specific configuration in my Nginx server in order to see telegram preview for my images ?

Expected behaviour

An image preview should appear in the Telegram message.

Actual behaviour

Only the URL to the image is being shown, no preview will ever show up.

Configuration

Operating system: Windows 8

Version of Telegram Desktop: 1.1.19

api issue

Most helpful comment

I can reproduce on Telegram Web using an URL with a hostname:

https://suchat.org:5443/eea8337bf704834779249f08b25ab7ea69f6fbdd/slsIkO6FL2egF2T8d4sj6zm0WeL5wA6IgLegnR4J/l_NoSGeUQF-Ju4mkTkypag.jpg

It seems that ports other than 80 or 443 aren't previewed either.

Should I open a different issue on Telegram Web's repo?

I thought I'd put it all together here, since it's labelled as an API issue.

Also: Is this the desired behaviour for previews?

If you ask me, I'd prefer it wasn't. So that Telegram groups that are connected to XMPP MUCs via bots have better UX, as uploaded files on XMPP are likely served on a port different than standard HTTP/S (at least that's the case for suchat.org, xabber.de and diaspora.com.ar, the 3 chat providers I use).

All 6 comments

Do you see any requests from Telegram servers in logs?
Probably it's a bug related either to lack of domain, or to port number being not 80/443.
Try to host the same image too.

This is most likely not related to TDesktop, but I'll close it once you find the problem and report to server side devs.

I am having the same problem here.

There is no preview for my image when posting the link on telegram.
The image is hosted on:
http://188.166.165.184/cloud/store/AgADBAADiq0xG5vA8VOaRuuF1o9DK3RQNBoABKMBI2a4dg-Xy5MFAAEC.jpg

@stek29 I checked what you asked and there was no request from telegram servers.

@733amir try to get a hostname and check if that solves it

I can reproduce on Telegram Web using an URL with a hostname:

https://suchat.org:5443/eea8337bf704834779249f08b25ab7ea69f6fbdd/slsIkO6FL2egF2T8d4sj6zm0WeL5wA6IgLegnR4J/l_NoSGeUQF-Ju4mkTkypag.jpg

It seems that ports other than 80 or 443 aren't previewed either.

Should I open a different issue on Telegram Web's repo?

I thought I'd put it all together here, since it's labelled as an API issue.

Also: Is this the desired behaviour for previews?

If you ask me, I'd prefer it wasn't. So that Telegram groups that are connected to XMPP MUCs via bots have better UX, as uploaded files on XMPP are likely served on a port different than standard HTTP/S (at least that's the case for suchat.org, xabber.de and diaspora.com.ar, the 3 chat providers I use).

That's known server side limitation, sadly

Was this page helpful?
0 / 5 - 0 ratings