Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

hexo-filter-variant-images

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-filter-variant-images

A plug-in to generate variant images

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

hexo-filter-variant-images

npm version

It is a Hexo plug-in for generating thumbnails etc. using ImageMagick.

Since you can freely set arguments, you can generate various kinds of images as well as thumbnails.

Required environment

  • ImageMagick

Installation

npm install hexo-filter-variant-images --save

Configuration

# variant images
variant_images:
  cmd: 'magick'
  match: '**/*.{jpg,gif,png}'
  match_options:
    debug: true
  exclude: 'static/**/*'
  priority: 5
  items:
    - suffix: '@preview'
      extension: 'gif'
      size: '20x20'
      blur: '1.5'
      posterize: '16'
      args: '-resize $size -blur $blur -posterize $posterize'
    - suffix: '@small'
      size: '120x120'
      args: '-resize $size'

cmd

Run command. The default value is magick.

Also I am only checking the operation with magick.

match

Specify the path of the target image file with glob.

The default value is **/*.{jpg,gif,png}

match_options

Option for minimatch. The default value is empty.

For details Minimatch#options

exclude

Specify the path of the file to be excluded with glob. The default value is empty.

priority

Specify the priority of the filter by numerical value. The default value is 5.

For details Filter | Hexo

items

Variations to generate. Required items are suffix, args

suffix

Suffix of the generated image.

extension

Extension of the generated image. If unspecified, it will have the same extension as the original image.

args

Arguments to pass to the command. If you write it like $size, you can refer to the settings in the same item.

items:
  - suffix: '@preview'
    extension: 'gif'
    size: '20x20'
    blur: '1.5'
    posterize: '16'
    args: '-resize $size -blur $blur -posterize $posterize'
  - suffix: '@small'
    args: '-resize 120x120'

Keywords

FAQs

Package last updated on 21 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc