Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何设置不转换 gif 文件为 webp 格式? #7

Open
luhuadong opened this issue Sep 15, 2024 · 2 comments
Open

如何设置不转换 gif 文件为 webp 格式? #7

luhuadong opened this issue Sep 15, 2024 · 2 comments

Comments

@luhuadong
Copy link
Member

No description provided.

@D-Sketon
Copy link
Member

exclude配置有用吗

@luhuadong
Copy link
Member Author

exclude配置有用吗

试了一下,似乎没有效果,配置是这样的:

minify:
  html:
    enable: true
    exclude: # 排除 hexo-feed 用到的模板文件
      - '**/json.ejs'
      - '**/atom.ejs'
      - '**/rss.ejs'
  css:
    enable: true
    exclude:
      - '**/*.min.css'
  js:
    enable: true
    mangle:
      toplevel: true
    output:
    compress:
    exclude:
      - '**/*.min.js'
  image:
    enable: true # Enable image preprocessing and automatic WebP conversion(hexo d)
    options:
      avif: false
      webp: true
      quality: 80
      effort: 2
      replaceSrc: true
    exclude:
      - '*.gif'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants