Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/travis-r6s/gridsome-transformer-image
https://github.com/travis-r6s/gridsome-transformer-image
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/travis-r6s/gridsome-transformer-image
- Owner: travis-r6s
- Created: 2020-10-12T12:40:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-12-27T12:30:11.000Z (about 1 year ago)
- Last Synced: 2025-01-02T09:49:55.719Z (22 days ago)
- Language: JavaScript
- Size: 2.93 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gridsome-transformer-image
> Image transformer for Gridsome
## Install
```sh
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`
```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`.