{"_id":"image-loader-next","_rev":"3-abd0662d7c67da7cb698a8290d3a42d0","name":"image-loader-next","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"image-loader-next","version":"0.1.0","keywords":["avif","bmp","gif","ico","image","images","jpeg","jpg","next","nextjs","next-image-loader","node","nodejs","png","rollup","svg","vite","vitest","webp"],"author":{"name":"Remco Haszing","email":"remcohaszing@gmail.com"},"license":"MIT","_id":"image-loader-next@0.1.0","maintainers":[{"name":"remcohaszing","email":"remcohaszing@gmail.com"}],"homepage":"https://github.com/remcohaszing/image-loader-next#readme","bugs":{"url":"https://github.com/remcohaszing/image-loader-next/issues"},"dist":{"shasum":"c1336e813e38be040dc2ecea96ea2c49455231bb","tarball":"https://registry.npmjs.org/image-loader-next/-/image-loader-next-0.1.0.tgz","fileCount":3,"integrity":"sha512-WeDlGEVEuiyFVlbWoypdBgQYBnd6Htm2tiSosjayFpXCOC4woToaGpw79i6MwGQSD6qYLvcuV33lmRJdKvjACg==","signatures":[{"sig":"MEUCIEGGaST/P64Ql31H68w9WJ6VlxjSPeweQvlmv1+kV5cxAiEA2c9n3wAX31AXJs8FIb3KxN2VEvlutkq5lbDcBDk047g=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":5563},"type":"module","exports":{"./node":"./dist/node.js","./rollup":"./dist/rollup.js"},"funding":"https://github.com/sponsors/remcohaszing","gitHead":"cc2eb53b8930080d7eb4c9d786ea7d9e6103d232","scripts":{"test":"vitest run && node test/node.ts","prepack":"tsc --build","pretest":"tsc --build"},"_npmUser":{"name":"remcohaszing","email":"remcohaszing@gmail.com"},"repository":{"url":"git+https://github.com/remcohaszing/image-loader-next.git","type":"git"},"_npmVersion":"11.9.0","description":"Load images in Node.js, Rollup, Vite, or Vitest the same way as Next.js","directories":{},"_nodeVersion":"24.14.0","dependencies":{"image-size":"^2.0.0","@types/node":"*"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.0.0","vitest":"^4.0.0","prettier":"^3.0.0","remark-cli":"^12.0.0","typescript":"^5.0.0","@remcohaszing/eslint":"^13.0.0","remark-preset-remcohaszing":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/image-loader-next_0.1.0_1773648003604_0.5981980710569637","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"image-loader-next","version":"0.1.1","keywords":["avif","bmp","gif","ico","image","images","jpeg","jpg","next","nextjs","next-image-loader","node","nodejs","png","rollup","svg","vite","vitest","webp"],"author":{"name":"Remco Haszing","email":"remcohaszing@gmail.com"},"license":"MIT","_id":"image-loader-next@0.1.1","maintainers":[{"name":"remcohaszing","email":"remcohaszing@gmail.com"}],"homepage":"https://github.com/remcohaszing/image-loader-next#readme","bugs":{"url":"https://github.com/remcohaszing/image-loader-next/issues"},"dist":{"shasum":"31f1bf0f173d96cbfb0a5471a40f4af2c0ad5024","tarball":"https://registry.npmjs.org/image-loader-next/-/image-loader-next-0.1.1.tgz","fileCount":18,"integrity":"sha512-FE5efqBO7z8YoKQjgmWrF/wJ38H8FHSOjOf1D8Q3AsF2HEQW9BXgsBbn6e/6k6aicKS3d/Pe+AlrKXh+AMwh2g==","signatures":[{"sig":"MEUCIQCy8islJrCzv1ZEbEl1Qq7nuIEbVbvfxpRXMdTLFp0oiQIgMcHdzu4s1HXgSyzT5KlsWhUAgMdXw1mschKOmlNSutg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/image-loader-next@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":16418},"type":"module","_from":"file:image-loader-next-0.1.1.tgz","exports":{"./node":"./dist/node.js","./rollup":"./dist/rollup.js"},"funding":"https://github.com/sponsors/remcohaszing","scripts":{"test":"vitest run && node test/node.ts","prepack":"tsc --build","pretest":"tsc --build"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ec38a315-578e-4693-a8d3-86f5686c0b57"}},"_resolved":"/home/runner/work/image-loader-next/image-loader-next/image-loader-next-0.1.1.tgz","_integrity":"sha512-FE5efqBO7z8YoKQjgmWrF/wJ38H8FHSOjOf1D8Q3AsF2HEQW9BXgsBbn6e/6k6aicKS3d/Pe+AlrKXh+AMwh2g==","repository":{"url":"git+https://github.com/remcohaszing/image-loader-next.git","type":"git"},"_npmVersion":"11.9.0","description":"Load images in Node.js, Rollup, Vite, or Vitest the same way as Next.js","directories":{},"_nodeVersion":"24.14.0","dependencies":{"image-size":"^2.0.0","@types/node":"*"},"_hasShrinkwrap":false,"devDependencies":{"rollup":"^4.0.0","vitest":"^4.0.0","prettier":"^3.0.0","remark-cli":"^12.0.0","typescript":"^5.0.0","@remcohaszing/eslint":"^13.0.0","remark-preset-remcohaszing":"^3.0.0"},"_npmOperationalInternal":{"tmp":"tmp/image-loader-next_0.1.1_1773828351931_0.6758437269449737","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"image-loader-next","version":"0.1.2","description":"Load images in Node.js, Rollup, Vite, or Vitest the same way as Next.js","keywords":["avif","bmp","gif","ico","image","images","jpeg","jpg","next","nextjs","next-image-loader","node","nodejs","png","rolldown","rolldown-plugin","rollup","rollup-plugin","svg","vite","vite-plugin","vitest","webp"],"homepage":"https://github.com/remcohaszing/image-loader-next#readme","bugs":{"url":"https://github.com/remcohaszing/image-loader-next/issues"},"repository":{"type":"git","url":"git+https://github.com/remcohaszing/image-loader-next.git"},"funding":"https://github.com/sponsors/remcohaszing","license":"MIT","author":{"name":"Remco Haszing","email":"remcohaszing@gmail.com"},"type":"module","exports":{"./node":"./dist/node.js","./rollup":"./dist/rollup.js"},"scripts":{"prepack":"tsc --build","pretest":"tsc --build","test":"vitest run && node test/node.ts"},"compatiblePackages":{"schemaVersion":1,"rolldown":{"type":"compatible","versions":"*"},"rollup":{"type":"compatible","versions":">=4.38.0"},"vite":{"type":"compatible","versions":">=6.3.0"}},"dependencies":{"@types/node":"*","image-size":"^2.0.0"},"devDependencies":{"@remcohaszing/eslint":"^13.0.0","prettier":"^3.0.0","remark-cli":"^12.0.0","remark-preset-remcohaszing":"^3.0.0","rollup":"^4.0.0","typescript":"^5.0.0","vitest":"^4.0.0"},"_id":"image-loader-next@0.1.2","_integrity":"sha512-iqPOkbml2JZnhm2+mM+uNOibv4mwf6rJHm4BEIrWGRwRVYFJbENAvvL/KvdPt8knEZ412oVEXXBAdQwA0yrZDA==","_resolved":"/home/runner/work/image-loader-next/image-loader-next/image-loader-next-0.1.2.tgz","_from":"file:image-loader-next-0.1.2.tgz","_nodeVersion":"24.14.0","_npmVersion":"11.9.0","dist":{"integrity":"sha512-iqPOkbml2JZnhm2+mM+uNOibv4mwf6rJHm4BEIrWGRwRVYFJbENAvvL/KvdPt8knEZ412oVEXXBAdQwA0yrZDA==","shasum":"17d9dea8bd8883aa5329adfde2d41682b62a0969","tarball":"https://registry.npmjs.org/image-loader-next/-/image-loader-next-0.1.2.tgz","fileCount":18,"unpackedSize":16783,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/image-loader-next@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDOxjX42X0IiuEdRN7D+GA6pwUwx2vFwYqcddpL7kNS7QIhAIyrIJpuG5GieB1sir5Ny5RISumvGCgDIOKy3Ows/0Yi"}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:ec38a315-578e-4693-a8d3-86f5686c0b57"}},"directories":{},"maintainers":[{"name":"remcohaszing","email":"remcohaszing@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/image-loader-next_0.1.2_1774610160013_0.8618681494692177"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-16T08:00:03.603Z","modified":"2026-03-27T11:16:00.453Z","0.1.0":"2026-03-16T08:00:03.740Z","0.1.1":"2026-03-18T10:05:52.088Z","0.1.2":"2026-03-27T11:16:00.144Z"},"bugs":{"url":"https://github.com/remcohaszing/image-loader-next/issues"},"author":{"name":"Remco Haszing","email":"remcohaszing@gmail.com"},"license":"MIT","homepage":"https://github.com/remcohaszing/image-loader-next#readme","keywords":["avif","bmp","gif","ico","image","images","jpeg","jpg","next","nextjs","next-image-loader","node","nodejs","png","rolldown","rolldown-plugin","rollup","rollup-plugin","svg","vite","vite-plugin","vitest","webp"],"repository":{"type":"git","url":"git+https://github.com/remcohaszing/image-loader-next.git"},"description":"Load images in Node.js, Rollup, Vite, or Vitest the same way as Next.js","maintainers":[{"name":"remcohaszing","email":"remcohaszing@gmail.com"}],"readme":"# image-loader-next\n\n[![github actions](https://github.com/remcohaszing/image-loader-next/actions/workflows/ci.yaml/badge.svg)](https://github.com/remcohaszing/image-loader-next/actions/workflows/ci.yaml)\n[![codecov](https://codecov.io/gh/remcohaszing/image-loader-next/branch/main/graph/badge.svg)](https://codecov.io/gh/remcohaszing/image-loader-next)\n[![npm version](https://img.shields.io/npm/v/image-loader-next)](https://www.npmjs.com/package/image-loader-next)\n[![npm downloads](https://img.shields.io/npm/dm/image-loader-next)](https://www.npmjs.com/package/image-loader-next)\n\nLoad images in Node.js, Rollup, Vite, or Vitest the same way as Next.js.\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n  - [Vite](#vite)\n  - [Node.js](#nodejs)\n- [API](#api)\n  - [`image-loader-next/node`](#image-loader-nextnode)\n  - [`image-loader-next/rollup`](#image-loader-nextrollup)\n- [Compatibility](#compatibility)\n- [License](#license)\n\n## Installation\n\n```sh\nnpm install image-loader-next\n```\n\n## Usage\n\nThis package exposes two entrypoints. The `image-loader-next/rollup` export exposes a Rollup plugin,\nwhich is compatible with both Rollup, Vite, and Vitest. The `image-loader-next/node` export exposes\na Node.js loader.\n\nThe generated image modules expose the properties `src`, `width`, and `height`, and a `default`\nexport that contains all of these as properties.\n\n### Vite\n\nTo use this project with Vite or Vitest, add it to your\n[`plugins`](https://vite.dev/config/shared-options#plugins) array.\n\n```js\nimport { nextImages } from 'image-loader-next/rollup'\nimport { defineConfig } from 'vite/config'\n\nexport default defineConfig({\n  plugins: [nextImages()]\n})\n```\n\n### Node.js\n\nTo use this project with Node.js, register it using the\n[`register`](https://nodejs.org/api/module.html#moduleregisterspecifier-parenturl-options) function\n\n```js\nimport { register } from 'node:module'\n\nregister('image-loader-next/node', import.meta.url)\n```\n\nOr register it via the `--loader` option.\n\n```sh\nnode --loader image-loader-next\n```\n\n## API\n\n### `image-loader-next/node`\n\nA Node.js loader.\n\n#### Initialize data\n\n- `cwd` (`string`) — The directory to generate the `src` property relative to. (Default:\n  `process.cwd()`)\n- `include` (`RegExp`) — A regular expression to test the import path against. (Default:\n  `/\\.(png|svg|jpg|jpeg|gif|webp|avif|ico|bmp)$/`)\n\n### `image-loader-next/rollup`\n\n#### `nextImages(options)`\n\nA rollup plugin to import images the same way as Next.js.\n\n##### Options\n\n- `cwd` (`string`) — The directory to generate the `src` property relative to. (Default:\n  `process.cwd()`)\n- `include` (`string | RegExp | (string | RegExp)[]`) — A filter of glob patterns and regular\n  expressions to include. (Default: `/\\.(png|svg|jpg|jpeg|gif|webp|avif|ico|bmp)$/`)\n- `exclude` (`string | RegExp | (string | RegExp)[]`) — A filter of glob patterns and regular\n  expressions to exclude. (Optional)\n\n## Compatibility\n\nThis project is compatible with Node.js 22 or greater.\n\n## License\n\n[MIT](LICENSE.md) © [Remco Haszing](https://github.com/remcohaszing)\n","readmeFilename":"README.md"}