hexo-tag-webp

version

A Hexo tag plugin to generate WebP format images from PNG files

Install

To install the hexo-tag-web plugin, run this command from within a Node.js terminal session - your current working directory must be that of your blog:

$ npm install hexo-tag-webp --save

This will install hexo-tag-webp and its dependencies into your blog.

Options

You can configure this plugin in _config.yml:

webpconfig: quality: 90 height: 260 width: 0
  • quality - Sets the quality of the image from 0 to 100
  • height - Specify the height of the new WebP image
  • width - Specify the width of the new WebP image

Specifying 0 for height or width will scale the image's height or width automatically, based on whether a non-zero value has been set for height or width.

Note: The plugin assumes you have asset_folder: true set in your _config.yml file - make sure you set this!

To do:

  • Remove reliance on setting asset_folder: true - make it optional
  • Add in more options from imagemin plugin
  • Add in support for PNG images
  • ...
If you would like to contribute, please feel free to submit a pull request!