From 83ffea7fa0ffd69c0bc7848d9a822356a2980062 Mon Sep 17 00:00:00 2001 From: Riley Chang Date: Mon, 4 Mar 2024 22:48:51 +0800 Subject: [PATCH] support more image formats --- posts.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts.go b/posts.go index a37db5f..46f5871 100644 --- a/posts.go +++ b/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)