Browse Source

Merge pull request #930 from tkngaejcpi/develop

support more image formats
develop
Matt Baer 2 weeks ago
committed by GitHub
parent
commit
9ece6682ef
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      posts.go

+ 1
- 1
posts.go View File

@@ -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