Installations
npm install gatsby-remark-relative-images-v2
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
8.11.2
NPM Version
5.6.0
Score
57.8
Supply Chain
82.3
Quality
73.5
Maintenance
25
Vulnerability
99.1
License
Releases
Unable to fetch releases
Contributors
Unable to fetch Contributors
Languages
JavaScript (100%)
Developer
Download Statistics
Total Downloads
97,167
Last Day
123
Last Week
545
Last Month
2,436
Last Year
27,739
GitHub Statistics
1 Stars
27 Commits
2 Forks
3 Watching
1 Branches
1 Contributors
Bundle Size
525.23 kB
Minified
158.39 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.1.5
Package Id
gatsby-remark-relative-images-v2@0.1.5
Unpacked Size
11.88 kB
Size
3.66 kB
File Count
4
NPM Version
5.6.0
Node Version
8.11.2
Total Downloads
Cumulative downloads
Total Downloads
97,167
Last day
-16.9%
123
Compared to previous day
Last week
-21.9%
545
Compared to previous week
Last month
11.8%
2,436
Compared to previous month
Last year
20.7%
27,739
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dev Dependencies
4
gatsby-remark-relative-images-v2
Convert image src(s) in markdown to be relative to their node's parent directory. This will help gatsby-remark-images match images outside the node folder. For example, use with NetlifyCMS.
NOTE: This was built for use with NetlifyCMS and should be considered a temporary solution until relative paths are supported. If it works for other use cases than great!
Install
npm install --save gatsby-remark-relative-images-v2
How to use
1// gatsby-config.js 2plugins: [ 3 // Add static assets before markdown files 4 { 5 resolve: 'gatsby-source-filesystem', 6 options: { 7 path: `${__dirname}/static/uploads`, 8 name: 'uploads', 9 }, 10 }, 11 { 12 resolve: 'gatsby-source-filesystem', 13 options: { 14 path: `${__dirname}/src/pages`, 15 name: 'pages', 16 }, 17 }, 18 { 19 resolve: `gatsby-transformer-remark`, 20 options: { 21 plugins: [ 22 // gatsby-remark-relative-images-v2 must 23 // go before gatsby-remark-images 24 { 25 resolve: `gatsby-remark-relative-images-v2`, 26 }, 27 { 28 resolve: `gatsby-remark-images`, 29 options: { 30 // It's important to specify the maxWidth (in pixels) of 31 // the content container as this plugin uses this as the 32 // base for generating different widths of each image. 33 maxWidth: 590, 34 }, 35 }, 36 ], 37 }, 38 }, 39];
To convert frontmatter images
Use the exported function fmImagesToRelative
in your gatsby-node.js
. This takes every node returned by your gatsby-source plugins and converts any absolute paths in markdown frontmatter data into relative paths if a matching file is found.
1// gatsby-node.js 2const { fmImagesToRelative } = require('gatsby-remark-relative-images-v2'); 3 4exports.onCreateNode = ({ node }) => { 5 fmImagesToRelative(node); 6};
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 0/27 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
license file not detected
Details
- Warn: project does not have a license file
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Reason
45 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-67hx-6x53-jw92
- Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw
- Warn: Project is vulnerable to: GHSA-cwfw-4gq5-mrqx
- Warn: Project is vulnerable to: GHSA-g95f-p29q-9xw4
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-p28h-cc7q-c4fg
- Warn: Project is vulnerable to: GHSA-9vvw-cc9w-f27h
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-hr2v-3952-633q
- Warn: Project is vulnerable to: GHSA-4gmj-3p3h-gm8h
- Warn: Project is vulnerable to: GHSA-qrmc-fj45-qfc2
- Warn: Project is vulnerable to: GHSA-8r6j-v8pm-fqw3
- Warn: Project is vulnerable to: MAL-2023-462
- Warn: Project is vulnerable to: GHSA-xf7w-r453-m56c
- Warn: Project is vulnerable to: GHSA-44pw-h2cw-w3vq
- Warn: Project is vulnerable to: GHSA-jp4x-w63m-7wgm
- Warn: Project is vulnerable to: GHSA-c429-5p7v-vgjp
- Warn: Project is vulnerable to: GHSA-qqgx-2p2h-9c37
- Warn: Project is vulnerable to: GHSA-896r-f27r-55mw
- Warn: Project is vulnerable to: GHSA-9c47-m6qq-7p4h
- Warn: Project is vulnerable to: GHSA-4xc9-xhrj-v574
- Warn: Project is vulnerable to: GHSA-x5rq-j2xg-h7qm
- Warn: Project is vulnerable to: GHSA-jf85-cpcp-j695
- Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw
- Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9
- Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
- Warn: Project is vulnerable to: GHSA-vh95-rmgr-6w4m
- Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h
- Warn: Project is vulnerable to: GHSA-rp65-9cf3-cjxr
- Warn: Project is vulnerable to: GHSA-hj48-42vr-x3v9
- Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp
- Warn: Project is vulnerable to: GHSA-6g33-f262-xjp4
- Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6
- Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw
- Warn: Project is vulnerable to: GHSA-2m39-62fm-q8r3
- Warn: Project is vulnerable to: GHSA-mf6x-7mm4-x2g7
- Warn: Project is vulnerable to: GHSA-j44m-qm6p-hp7m
- Warn: Project is vulnerable to: GHSA-3jfq-g458-7qm9
- Warn: Project is vulnerable to: GHSA-5955-9wpr-37jh
- Warn: Project is vulnerable to: GHSA-f5x3-32g6-xq36
- Warn: Project is vulnerable to: GHSA-g7q5-pjjr-gqvp
- Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3
Score
1.3
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More