{"id":15649627,"url":"https://github.com/zyyv/unplugin-vue-image","last_synced_at":"2026-02-24T12:01:31.105Z","repository":{"id":37801833,"uuid":"458199743","full_name":"zyyv/unplugin-vue-image","owner":"zyyv","description":"自动引入图片。Auto import images.","archived":false,"fork":false,"pushed_at":"2023-10-07T16:54:27.000Z","size":639,"stargazers_count":37,"open_issues_count":4,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-30T11:53:21.577Z","etag":null,"topics":["unplugin","vite"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zyyv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"chris-zhu"}},"created_at":"2022-02-11T13:34:23.000Z","updated_at":"2024-12-04T09:31:56.000Z","dependencies_parsed_at":"2024-10-03T12:31:52.188Z","dependency_job_id":"0db6d1c2-fd6a-454b-b39c-a00a1f9095df","html_url":"https://github.com/zyyv/unplugin-vue-image","commit_stats":null,"previous_names":["chris-zhu/unplugin-vue-image"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/zyyv/unplugin-vue-image","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyyv%2Funplugin-vue-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyyv%2Funplugin-vue-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyyv%2Funplugin-vue-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyyv%2Funplugin-vue-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zyyv","download_url":"https://codeload.github.com/zyyv/unplugin-vue-image/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zyyv%2Funplugin-vue-image/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29781207,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-24T10:45:18.109Z","status":"ssl_error","status_checked_at":"2026-02-24T10:45:09.911Z","response_time":75,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["unplugin","vite"],"created_at":"2024-10-03T12:30:33.760Z","updated_at":"2026-02-24T12:01:31.087Z","avatar_url":"https://github.com/zyyv.png","language":"TypeScript","readme":"# unplugin-vue-image\n\n[![NPM version](https://img.shields.io/npm/v/unplugin-vue-image?color=a1b858\u0026label=)](https://www.npmjs.com/package/unplugin-vue-image)\n\n## Install\n\n```bash\nnpm i unplugin-vue-image -D\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eVite\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// vite.config.ts\nimport Image from 'unplugin-vue-image/vite'\n\nexport default defineConfig({\n  plugins: [\n    Image({ /* options */ }),\n  ],\n})\n```\n\nExample: [`playground/`](./playground/)\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRollup\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// rollup.config.js\nimport Image from 'unplugin-vue-image/rollup'\n\nexport default {\n  plugins: [\n    Image({ /* options */ }),\n  ],\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eWebpack\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// webpack.config.js\nmodule.exports = {\n  /* ... */\n  plugins: [\n    require('unplugin-vue-image/webpack')({ /* options */ }),\n  ],\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eNuxt\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// nuxt.config.js\nexport default {\n  buildModules: [\n    ['unplugin-vue-image/nuxt', { /* options */ }],\n  ],\n}\n```\n\n\u003e This module works for both Nuxt 2 and [Nuxt Vite](https://github.com/nuxt/vite)\n\n\u003cbr\u003e\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eVue CLI\u003c/summary\u003e\u003cbr\u003e\n\n```ts\n// vue.config.js\nmodule.exports = {\n  configureWebpack: {\n    plugins: [\n      require('unplugin-vue-image/webpack')({ /* options */ }),\n    ],\n  },\n}\n```\n\n\u003cbr\u003e\u003c/details\u003e\n\n## Usage\n\n`unplugin-vue-image` auto import your image from `assets/images` by default to your Vue component.\n\nYou can only use image variables using camelCase.\n\n```\n--- aseets\n  --- images\n    --- logo.png\n--- App.vue\n```\n\n```vue\n--- src/App.vue ---\n\u003ctemplate\u003e\n  \u003cdiv\u003e\n    \u003cimg :src=\"Logo\"\u003e\n  \u003c/div\u003e\n\u003c/template\u003e\n```\n\n## Credits\nThis plugin was inspired by [vite-plugin-vue-images](https://github.com/sampullman/vite-plugin-vue-images), it's an enhanced version of it.\n\n## License\n\n[MIT](./LICENSE)\n","funding_links":["https://github.com/sponsors/chris-zhu"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyyv%2Funplugin-vue-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzyyv%2Funplugin-vue-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzyyv%2Funplugin-vue-image/lists"}