mirror of
https://github.com/discourse/discourse.git
synced 2026-08-11 02:59:07 +08:00
Facebook's crawler requires image dimension metadata to reliably display image previews when Discourse links are shared. Currently, we only emit `og:image` without the structured dimension properties, which causes Facebook (and other consumers) to skip the image in share previews. This adds `og:image:width` and `og:image:height` meta tags for topic pages by exposing the image upload's dimensions through TopicView and passing them to `crawlable_meta_data`. The dimensions are only emitted when both width and height are available on the upload record. https://meta.discourse.org/t/395484 |
||
|---|---|---|
| .. | ||
| omniauth_callbacks | ||
| admin_login.html.erb | ||
| bookmarks.ics.erb | ||
| confirm_admin.html.erb | ||
| password_reset.html.erb | ||
| send_activation_email.html.erb | ||
| show.html.erb | ||