Skip to content
Snippets Groups Projects
Commit f9f69181 authored by Akihiko Odaki's avatar Akihiko Odaki Committed by Eugen Rochko
Browse files

Store preview image for embedded photo in preview cards (#5986)

The preview image would be useful to embed in timeline.
parent 2a61b9f0
No related branches found
No related tags found
No related merge requests found
......@@ -89,6 +89,7 @@ class FetchLinkCardService < BaseService
when 'photo'
return false unless response.respond_to?(:url)
@card.embed_url = response.url
@card.image = URI.parse(response.url)
@card.width = response.width.presence || 0
@card.height = response.height.presence || 0
when 'video'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment