Set the image used for social network sharing?

Yes this is a great fallback.

Also apologies I forgot we added that other per-category social media share image setting. I kinda blacked that out due to trauma over the earlier discussion :face_with_head_bandage:

When working on adding this feature I caught a bug. I noticed that right now here is how we prioritize OpenGraph image: first post image > opengraph_image > twitter_summary_large_image_url > site_apple_touch_icon_url.

And https://discourse.codinghorror.com did had the site_apple_touch_icon_url so the twitter:image tag was present <meta name="twitter:image" content="/images/default-apple-touch-icon.png" />.

Turns out Twitter does not support relative image paths. This is now fixed via:

https://github.com/discourse/discourse/commit/f83533e1cb5ff262cb25d9392bc2dcc1621fb0ab

Above commit also adds logo_url as last resort for OpenGraph/Twitter image tag. This updates opengraph image priority to: first post image > opengraph_image > twitter_summary_large_image_url > site_apple_touch_icon_url > logo_url.

Verified the fix on https://discourse.codinghorror.com:

When set, the large_icon may be preferable than site_apple_touch_icon_ur because it’s larger. Also we did bug everyone to set it already.

I added the large_icon as fallback. The new priority is: first post image > opengraph_image > twitter_summary_large_image_url > site_large_icon_url > site_apple_touch_icon_url > site_logo_url .

REFACTOR: Simplify finding the opengraph image · discourse/discourse@ec7f418 · GitHub

This also removes the warning that has been flooding the logs.

SiteSetting.logo_url has been deprecated and will be removed in the 2.4 Release. Please use SiteSetting.logo instead

우리 커뮤니티의 많은 게시글에는 여러 이미지가 포함되어 있을 수 있습니다.

특정 주제에 대해 opengraph 및 소셜 공유에 사용할 이미지를 지정하거나, 이미지를 태그하는 방법이 있을까요?

또한, Topic List Previews 플러그인(@merefield 과 @angus 제작)은 게시글의 첫 번째 이미지를 가져와 섬네일 또는 타일 이미지로 사용합니다. 이 플러그인이 2번째, 3번째, 8번째 이미지 등 특정 순서의 이미지를 사용하도록 설정할 수 있는지 궁금합니다.


참고로 @codinghorror, 위에서 언급한 2.4 릴리스의 Better Insert Hyperlink 기능을 테스트해 보았는데, Topic List Previews 플러그인 토론을 찾는 데 사용하고, 바로 이 하이퍼링크에도 사용했습니다. 멋진 새 기능입니다!! :raising_hands:

이미 플러그인에 해당 기능이 포함되어 있습니다. 지난해에 썸네일 선택기를 추가했거든요 :slight_smile: (참고로, 이것이 소셜 공유에 어떤 영향을 미칠지는 아직 고려해 보지 않았습니다. 자유롭게 실험해 보세요!)

네 – 첫 번째 큰 이미지가 사용됩니다. 따라서 가장 중요한 이미지를 첫 번째로 배치하세요(그리고 충분히 크고, 작은 이미지는 작동하지 않습니다).

@merefield와 @codinghorror - Topic List Previews 도구를 사용하면 섬네일에 사용할 대표 이미지를 선택할 수 있을 뿐만 아니라, 이렇게 선택한 이미지가 오픈그래프(OpenGraph) 및 소셜 공유 시 표시되는 이미지로도 함께 적용된다는 것을 확인했습니다. 이는 게시물의 첫 번째 이미지를 기본적으로 표시하는 기존 설정 대신 동작합니다!

“섬네일 선택” 기능을 사용하여 8번째 이미지를 선택한 예시입니다. 이렇게 하면 공유 시(그리고 제 “최신” 주제 페이지에서) 게시물이 다음과 같이 표시됩니다:

Topic List Preview 플러그인을 사용하여 섬네일 이미지를 선택하는 방법은 다음과 같습니다…

기록으로 남기겠습니다: Discourse Core는 2021년 2월부터 이 기능을 지원하고 있습니다. 향후 더 쉽게 찾을 수 있도록 개선할 수 있지만, 당분간은 이미지의 마크다운을 수동으로 편집하여 썸네일로 설정할 수 있습니다.

기본적으로 Discourse는 주제(OP)의 첫 번째 이미지를 사용합니다. OP에서 다른 이미지를 선택하려면 마크다운에 |thumbnail을 추가하세요. 예를 들어

![alttext|100x100](upload://aaa)
![alttext|100x100|thumbnail](upload://bbb) << 이 이미지가 썸네일로 사용됩니다

(이 기능은 원래 공식 Topic List Thumbnails 주제에서 논의되었지만, 이 코어 썸네일 선택 기능은 해당 테마 컴포넌트에 국한되지 않습니다)