# @capsia/gridsome-plugin-local-image

> Simple gridsome plugin to download a remote image based on a defined graphql field

Latest version **1.3.0** (published 2022-06-04) · MIT license · 0 weekly downloads

## Install

```sh
npm install @capsia/gridsome-plugin-local-image
pnpm add @capsia/gridsome-plugin-local-image
yarn add @capsia/gridsome-plugin-local-image
bun add @capsia/gridsome-plugin-local-image
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.3.0 |
| Published | 2022-06-04 |
| First published | 2021-03-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 4 |
| Unpacked size | 9.7 KB |
| Known vulnerabilities | 0 (+24 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Riccardo Riccio |
| Maintainers | capsia |
| Keywords | vue, download, image, gridsome, gridsome-plugin |

## Links

- npm: https://www.npmjs.com/package/@capsia/gridsome-plugin-local-image
- Repository: https://github.com/capsia37/gridsome-plugin-remote-image
- Issues: https://github.com/capsia37/gridsome-plugin-remote-image/issues
- npm.io page: https://npm.io/package/@capsia/gridsome-plugin-local-image

## Dependencies (4)

- [mime](https://npm.io/package/mime.md) ^3.0.0
- [axios](https://npm.io/package/axios.md) ^0.27.2
- [fs-extra](https://npm.io/package/fs-extra.md) ^10.1.0
- [validate.js](https://npm.io/package/validate.js.md) ^0.13.1

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 1.3.0 (latest) — 2022-06-04
- 1.2.0 — 2022-03-18
- 1.1.4 — 2021-12-28
- 1.1.1 — 2021-03-19
- 1.1.0 — 2021-03-17
- 1.0.1 — 2021-03-15
- 1.0.0 — 2021-03-15

## README

# Gridsome Local Image Downloader

This is a Gridsome plugin to download remote images based on @noxify/gridsome-plugin-remote-image

The aim of this plugin is to solve two limitations from the original one.

In this plugin you won't need a target field parameter, because it overwrites the source field. If you need to keep the remote path use the original plugin.

There are also a few more changes:

This plugin uses the String type instead of the Image type. To use it you should set the src attribute of your g-image as follows:

```html
:src="require(`!!assets-loader!@/${object.img}`)"
```

## Install

```sh
npm i @capsia/gridsome-plugin-local-image
```

## Setup

```js
//gridsome.config.js

module.exports = {
  siteName: 'Gridsome',
  plugins: [
    //...
    {
      use: '@capsia/gridsome-plugin-local-image',
      options: {
        'typeName' : 'Entry',
        'sourceField': 'object.img',
        'targetPath': './src/assets/remoteImages'
      }
    },
    {
      use: '@capsia/gridsome-plugin-local-image',
      options: {
        'typeName' : 'Entry',
        'sourceField': 'remoteImages',
        'targetPath': './src/assets/remoteImages'
      }
    }
  ]
  //...
}
```

## Documentation

You can find more info at the original documentation:

https://webstone.info/documentation/gridsome-plugin-remote-image

---
_Source: https://npm.io/package/@capsia/gridsome-plugin-local-image · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
