support more image formats

pull/930/head
Riley Chang 9 months ago
parent 427f4980b9
commit 83ffea7fa0
No known key found for this signature in database
GPG Key ID: B27161E90325DD57
  1. 2
      posts.go

@ -1669,7 +1669,7 @@ func (rp *RawPost) Updated8601() string {
return rp.Updated.Format("2006-01-02T15:04:05Z")
}
var imageURLRegex = regexp.MustCompile(`(?i)[^ ]+\.(gif|png|jpg|jpeg|image)$`)
var imageURLRegex = regexp.MustCompile(`(?i)[^ ]+\.(gif|png|jpg|jpeg|avif|avifs|webp|jxl|image)$`)
func (p *Post) extractImages() {
p.Images = extractImages(p.Content)

Loading…
Cancel
Save