From 0e31ce9110b692b68a9c5d065ba61168877320cf Mon Sep 17 00:00:00 2001 From: Harrison Healey Date: Sat, 9 Feb 2019 04:44:38 -0500 Subject: [PATCH] MM-13997 Prioritize images over OpenGraph metadata when requesting metadata (#10241) --- app/post_metadata.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/post_metadata.go b/app/post_metadata.go index d3ebe10675..fa1593d852 100644 --- a/app/post_metadata.go +++ b/app/post_metadata.go @@ -364,7 +364,7 @@ func (a *App) getLinkMetadata(requestURL string, timestamp int64, isNewPost bool // /api/v4/image requires authentication, so bypass the API by hitting the proxy directly body, contentType, err = a.ImageProxy.GetImageDirect(a.ImageProxy.GetUnproxiedImageURL(request.URL.String())) } else { - request.Header.Add("Accept", "text/html, image/*") + request.Header.Add("Accept", "image/*, text/html") client := a.HTTPService.MakeClient(false) client.Timeout = time.Duration(*a.Config().ExperimentalSettings.LinkMetadataTimeoutMilliseconds) * time.Millisecond