gridsome-transformer-image
v0.1.1
Published
Image transformer plugin for Gridsome
Downloads
4
Maintainers
Readme
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
.