Skip to content

JFossey/gridsome-transformer-image

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

gridsome-transformer-image

Image transformer for Gridsome

Install

yarn add gridsome-transformer-image # or
npm install gridsome-transformer-image

Usage

The transformer is automatically used if installed in your project. Make sure to add the @gridsome/source-filesystem plugin, and configure the options to point to a directory containing your images.

gridsome.config.js

module.exports = {
  ...
  plugins: [
    {
      use: '@gridsome/source-filesystem',
      options: {
        typeName: 'LocalImage',
        path: './images/**/*' // Or specify a specific filetype, like *.jpg
      }
    }
  ]
}

Important Note

You cannot use Image as your typeName as this is reserved by Gridsome. Instead, use something like LocalImage.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%