Skip to content
/ hugo Public
forked from gohugoio/hugo

Commit

Permalink
Set ext of image/jpeg files without ext to .jpg
Browse files Browse the repository at this point in the history
  • Loading branch information
jmooring committed Dec 12, 2021
1 parent 657d027 commit 29c94a7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions resources/resource_factories/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,9 @@ func (c *Client) FromRemote(uri string, options map[string]interface{}) (resourc
if ct := http.DetectContentType(body); ct != "application/octet-stream" {
if arr, _ := mime.ExtensionsByType(ct); arr != nil {
contentType = arr[0]
if contentType == ".jpe" {
contentType = ".jpg"
}
}
}
}
Expand Down

0 comments on commit 29c94a7

Please sign in to comment.