chore: add avif to the list of supported image formats

This commit is contained in:
DeepChirp
2024-11-07 18:09:01 +08:00
parent 91c8c5cd4b
commit 5338a2be99

View File

@@ -6,7 +6,7 @@
'use strict'
hexo.extend.filter.register('before_post_render', data => {
const imgTestReg = /\.(png|jpe?g|gif|svg|webp)(\?.*)?$/i
const imgTestReg = /\.(png|jpe?g|gif|svg|webp|avif)(\?.*)?$/i
let { cover: coverVal, top_img: topImg } = data
// Add path to top_img and cover if post_asset_folder is enabled