Fix #5360: Use OpenGraph's og:image metadata for posts.
* Add og:image:width, og:image:height, and og:image:type tags. * Use og:video tags for videos. * Use 720x720 instead of 150x150 preview images for videos. * Add duration tag to JSON-LD data for videos. * Add OpenGraph tags to media assets show page. * Respect Twitter max image size limits. * Don't include OpenGraph image tags when someone shares a plain https://danbooru.donmai.us link with no tag search. This caused random potentially NSFW images to be shown when someone shared a https://danbooru.donmai.us link on social media, which could be cached for long periods of time.
This commit is contained in:
@@ -193,4 +193,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<% content_for(:html_header) do %>
|
||||
<%= render OpenGraphComponent.new(media_asset: @media_asset, current_user: CurrentUser.user) %>
|
||||
<% end %>
|
||||
|
||||
<%= render "uploads/secondary_links" %>
|
||||
|
||||
Reference in New Issue
Block a user