npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

hexo-imgix

v2.0.1

Published

Tools supporting imgix in hexo. Included are a filter, tag and helper

Readme

hexo-tag-imgix

Support for imgix url substitution via a handy tag. Works in templates too.

_config.yml

Minimal options. This will effectively just substitute your internal urls for imgix urls, perhaps leveraging it as a CDN, or maybe you're putting the imgix query params directly on your image urls?

imgix:
  match: https://s3.amazonaws.com/example-bucket
  domain: example.imgix.net

All options. It can do a lot!

imgix:
  - name: example
    match: https://s3.amazonaws.com/example-bucket
    domain: example.imgix.net
    secure_url: false
    srcset:
      scale: [ 0.5, 0.75, 1.00 ]
      sizes: 100vw
    params:
      w: 500
      h: 500
      blend: color
    filter: true
    tag: true
    helper: true

  - name: uploads
    match: /assets/uploads
    domain: uploads.imgix.net
    secure_url: true
    srcset:
      scale: [ 0.5, 0.75, 1.00 ]
      sizes: (min-width: 36em) 33.3vw, 100vw
      min: 300
      max: 1000
    params:
      w: 800
    filter: false
    tag: true
    helper: false

Options

You can provide either a single "profile" object, or an array of profiles. Later profiles that define the same match will override earlier profiles.

  • match*: A match string to test for domain substitution, applied to urls / paths provided to the tag/helper/filter. When a match is made this profile will be applied.
  • domain*: An imgix domain, will be substituted for the match when the url is rebuilt
  • name: If you provide a name you can reference this profile specifically in the helper. Useful if you have multiple profiles for the same match.
  • securl_url: Whether this domain supports SSL
  • srcset: If set, will create a scaled srcset on your output img tag
    • scale: Scaling values to use, 0.00-1.00
    • sizes: pushed straight into your images sizes attr
    • min: A minimum computed size to allow into your srcset
    • max: A maximum computed size to allow into your srcset
  • filter: Enables the filter for this profile. It can upgrade image markup after rendering. Default is enabled.
  • tag: Enables the tag for this profile. You can use this directly in markdown to manipulate images. Default is enabled.
  • helper: Enables the template helper for this profile, which allows similar functionality in templates. Default is enabled.

* denotes a required property

Syntax

The syntax is almost identical to the Hexo img tag, but accepts colon-separated parameters in the space before the image url.

{% imgix [class names AND/OR params:values] /path/to/image [width] [height] ['title text' ['alt text']] %}

Usage

Minimal use in markdown

{% imgix https://s3.amazonaws.com/example-bucket/example.jpg %}
<img src="http://example.imgix.net/example.jpg" alt="" />

Sample args all

{% imgix blend:color inline-image https://s3.amazonaws.com/example-bucket/example.jpg 1000 500 "'This is a title'" "'This is alt text'" %}
<img src="http://example.imgix.net/example.jpg?w=1000&h=500&blend=color" class="inline-image" alt="This is alt text" title="This is a title" />

As a template helper, in ejs for example

<%- imgix(photo.src, { classes: ["class1", "class2"], attrs: { "height": 500, "width": 1000 }, params: { blend: "color" }, profile: "example" }) %>
<%- imgix_url(photo.src, { attrs: { "height": 500, "width": 1000 }, params: { blend: "color" }, profile: "example" }) %>
<img src="http://example.imgix.net/example.jpg?w=1000&h=500&blend=color" class="class1 class2" alt="" />
http://example.imgix.net/example.jpg?w=1000&h=500&blend=color

Suggestions

When using the filter processor I like to use hexo-markdown-it, along with the markdown-it-imsize plugin / module to specify image dimensions in my markdown, and generate source-size-aware imgix tags.

Resources