Skip to content

Simple plugin to download remote images in Gridsome, which enables you to take advantage of Gridsome's native image resizing and optimisation.

License

Notifications You must be signed in to change notification settings

jammeryhq/gridsome-plugin-remote-images

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fast-track your JAMstack development & learning


About this plugin

Simple plugin to download remote images in Gridsome, which enables you to take advantage of Gridsome's native image resizing and optimisation.

Installation

npm install @jammeryhq/gridsome-plugin-remote-images

# or

yarn add @jammeryhq/gridsome-plugin-remote-images

Key features

  • Download one image ( String field )
  • Download multiple images ( Array fields )
  • Caching
  • Option to keep the original field value

How to use

//gridsome.config.js

module.exports = {
  siteName: 'Gridsome',
  plugins: [
    //...
    {
      use: '@jammeryhq/gridsome-plugin-remote-images',
      options: {
        'typeName' : 'Entry',
        'sourceField': 'remoteImage',
        'targetField': 'imageDownloaded',
        'targetPath': './src/assets/remoteImages'
      }
    },
    {
      use: '@jammeryhq/gridsome-plugin-remote-images',
      options: {
        'typeName' : 'Entry',
        'sourceField': 'remoteImages',
        'targetField': 'imagesDownloaded',
        'targetPath': './src/assets/remoteImages'
      }
    }
  ]
  //...
}

Documentation

You can find the complete documentation here: https://webstone.info/documentation/gridsome-plugin-remote-image

About

Simple plugin to download remote images in Gridsome, which enables you to take advantage of Gridsome's native image resizing and optimisation.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%