Icon Module

Last updated 4 months ago

npm npm (scoped with tag)

This module automatically generates app icons and favicon with different sizes using jimp and fills manifest.icons[] with proper paths to generated assets that is used by manifest module. Source icon is being resized using cover method.

You can pass options to icon section in nuxt.config.js to override defaults.

icon: {
// Icon options



  • Default: [srcDir]/static/icon.png


  • Default: [16, 120, 144, 152, 192, 384, 512]

Array of sizes to be generated (Square).


  • Default: true

Make icons accessible through ctx or Vue instances.

Example: ctx.$icon(512) will return the url for the icon with the size of 512px. Will return an empty string when no icon in the given size is available (eg. when the size is not in sizes array).


  • Default: '$icon'

Name of property for accessible icons.