0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-10 23:00:09 +08:00
discourse/app/controllers/admin/config
Penar Musaraj 2d895de297
FEATURE: generated OpenGraph images for topics (#39194)
Adds the ability to automatically generate Open Graph images for topics
that don't have their own image. When enabled via the
generate_topic_og_image site setting, a background job creates a branded
1200×630 PNG for each new topic OP.

Key changes:
- TopicOgImageGenerator builds an SVG and converts it to PNG via
ImageMagick
  - Images generated via GenerateTopicOgImage Sidekiq job
- Generated images handled via og_image_upload_id column on the topics
table
- TopicView#image_url falls back to the generated OG image when no topic
image is available

This includes a preview for admins so they can see if they like this
feature or not:


https://github.com/user-attachments/assets/62d17704-4ee5-4859-ac37-b127fe27b85c


And it also respects the site's default theme: 

<img width="1200" height="630" alt="image"
src="https://github.com/user-attachments/assets/678f5c5d-e593-4385-b800-141196dfc221"
/>

---------

Co-authored-by: discourse-patch-triage[bot] <272280883+discourse-patch-triage[bot]@users.noreply.github.com>
Co-authored-by: Gabriel Grubba <gabriel@discourse.org>
2026-06-26 10:37:10 -04:00
..
about_controller.rb FEATURE: Localizable /about page fields via its settings page (#41123) 2026-06-26 20:41:08 +08:00
color_palettes_controller.rb
customize_controller.rb
discourse_id_controller.rb FIX: Log Discourse ID setting changes to staff action logs (#37649) 2026-02-10 18:18:35 +11:00
flags_controller.rb DEV: Update rubocop-discourse to 3.13 and autofix issues (#35073) 2025-10-06 16:11:01 +02:00
fonts_controller.rb DEV: Allow specifying dependent settings in configuration (#36061) 2025-11-27 13:23:43 +08:00
logo_controller.rb FEATURE: generated OpenGraph images for topics (#39194) 2026-06-26 10:37:10 -04:00
site_settings_controller.rb
upcoming_changes_controller.rb FEATURE: Merge permanent upcoming changes with new features feed (#38526) 2026-03-25 07:52:31 +10:00
welcome_banner_controller.rb UX: add admin config area for welcome banner (#36022) 2025-11-19 11:46:54 -05:00