Gathering detailed insights and metrics for gatsby-remark-relative-images-v2
Gathering detailed insights and metrics for gatsby-remark-relative-images-v2
Gathering detailed insights and metrics for gatsby-remark-relative-images-v2
Gathering detailed insights and metrics for gatsby-remark-relative-images-v2
Convert markdown image src(s) to be relative for gatsby-remark-images.
npm install gatsby-remark-relative-images-v2
Typescript
Module System
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
1 Stars
27 Commits
2 Forks
2 Watchers
1 Branches
1 Contributors
Updated on Aug 13, 2021
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
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
4
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!
npm install --save gatsby-remark-relative-images-v2
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];
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};
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
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
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
47 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
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