Gathering detailed insights and metrics for next-image-meta-loader
Gathering detailed insights and metrics for next-image-meta-loader
npm install next-image-meta-loader
Typescript
Module System
Min. Node Version
Node Version
NPM Version
42.8
Supply Chain
62.6
Quality
70.2
Maintenance
50
Vulnerability
97.9
License
TypeScript (69.67%)
JavaScript (30.33%)
Total Downloads
1,136
Last Day
1
Last Week
4
Last Month
20
Last Year
229
5 Stars
1 Commits
2 Watching
1 Branches
1 Contributors
Latest Version
2.0.0
Package Id
next-image-meta-loader@2.0.0
Unpacked Size
22.30 kB
Size
6.54 kB
File Count
8
NPM Version
6.14.10
Node Version
14.15.4
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
100%
4
Compared to previous week
Last month
17.6%
20
Compared to previous month
Last year
4.1%
229
Compared to previous year
3
1
3
Features:
next/image
and other optimizers (to prevent layout shift)import
or require
statement into an object that contains not only the file name but all the above meta data; works both server side and client side in Next.JS, compatible with SSG and SSRnpm install next-image-meta-loader next-compose-plugins
Add the plugin with next-compose-plugins
to your Next.js configuration:
1// next.config.js 2const withPlugins = require("next-compose-plugins"); 3const nextImageMetaLoader = require("next-image-meta-loader"); 4 5module.exports = withPlugins([ 6 nextImageMetaLoader 7 // your other plugins here 8]);
Option | Default | Type | Description |
---|---|---|---|
contentThemeFolder | './content/theme' | string | The folder where theme files including favicon are kept |
imageMetaOutput | './static/media' | string | The public folder where all output will be placed |
imageMetaExtensions | ['svg', 'png', 'jpe?g', 'gif', 'mp4'] | Array | The list of extensions to process |
imageMetaName | '[name].[hash].[ext]' | string | The naming convention of the output files |
You can now simply import images in your projects directly from source folders.
1 const meta = require('./images/narative-output.png') 2 3 /** meta now contains: { 4 width: 800, 5 height: 600 6 aspectRatio: 1.25, 7 blurWidth: 16, 8 blurHeight: 13, 9 lqip: 'data:image/webp;base64,XXXXXXXX', 10 src: 'static/media/XXXXX' // actual location of file in the Next.js public folder 11 } 12 */
With the right mdx component that does a require like the above, you can also include directly in MDX and get the advantage of lqip, lazy loading, next.js image optimization etc.. See next-theme-novela for an example of such an Image
component.
1![This is the alt text](./images/narative-output.png)
Licensed under the MIT license.
© Copyright Guy Barnard and Tinia Labs contributors
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/1 approved changesets -- 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
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-12-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