Site logo is giant in Discord and Slack embeds


(Tellow Krinkle) #1

When sending a link to the Swift Forums on either Discord or Slack, the swift logo is giant appearing as an attached image, looking like this:

.

On the other hand, most other Discourse-based forums seem to be able to have their embeds’ images as thumbnails like this:

It would be nice if the logo could be set as a thumbnail rather than an image so that it was less giant.


Swift logo is stretched
#2

Did you report this to Discord or Slack? It’s hard to see how this could be or is the forum’s fault.


(Tellow Krinkle) #3

Given that other Discourse-based forums work fine, I would guess it’s something the website does. I doubt Discord and Slack hardcode every single website in existence.


(Perry Fraser) #4

I assume that this is the Swift forums fault because no other discourse forum behaves this way, and there’s (probably) nothing wrong with Slack or Discord’s link embeds.


Could it be possible that the logo is so big that it’s displayed as if it were a primary image, or maybe something similar to that? Also, I don’t know that much about how meta attributes work, but the ones on here seem the same to the ones on the meta discourse, leading me to think it’s the image size.


(Tellow Krinkle) #5

Specifically, both Discord and Slack use oEmbed to get information for their embeds. Do you know if the forums support this, and if they do, whether or not it supplies the logo as a thumbnail url or a photo?

Edit: They both also support Open Graph as well, that may also be a source of the information


#6
<meta property="og:image" content="https://discourse-cdn-sjc1.com/swift/uploads/default/original/1X/0a90dde98a223f5841eeca49d89dc9f57592e8d6.png" />

but then it’s up to Discord and Slack how to display that image. Presumably they use some sort of image size heuristic.


(Tellow Krinkle) #7

In that case, is there any reason it needs to be the size it currently is? Would it be okay if it were resized to about 350x350 (the size of meta.discourse’s logo, which appears small in both applications)?


(Nicole Jacque) #9

@TellowKrinkle I can look into it. There was no reason to before though, because Discourse properly sized the larger image.


(Perry Fraser) #10

Any progress? I'm still getting the issue.


(Jamie Bishop) #11

This is also happening on twitter for me too now.


(Mihai) #12

Is there a Slack channel for Swift.org?


(Jamie Bishop) #13

There's an IBM one afaik, but I use the discord because of the better features in the app.


(John McCall) #14

Nothing official. You should start a new thread for questions like this in the future, though.


#15

This is a bit dated, but I figured out the reason — <meta name="twitter:card" content="summary_large_image"> property that is to blame.

Indeed, https://forums.swift.org (unjustifiably) has this very meta tag in its HTML code. In contrast, deep links like this thread have another tag, <meta name="twitter:card" content="summary">, which makes a rich embed a little more humble.