Auto-import images into Vue templates for Vite projects, eliminating manual imports for Vite 2 + Vue 3. Version 0.6.1 is current, with a maintenance-level release cadence. Unlike manual imports, this plugin resolves images from configured directories and transforms template references into automatically imported variables. Key differentiator: convention-based image discovery with PascalCase naming and subdirectory prefix support. Limited to Vite 2 and Vue 3; no longer actively developed.
npm install vite-plugin-vue-imagesVerified import paths — ran on the pinned version, not inferred.
Configure the plugin in vite.config.ts and use images in Vue templates without explicit imports.
Upgrade to a Vite 2 project or use an alternative plugin for Vite 3+.
Avoid naming Vue component data or props with the same PascalCase name as image files.
Always use :src for image references in templates.
Ensure unique file names across all configured image directories.
Run 'npm install -D vite-plugin-vue-images' and import as 'import ViteImages from "vite-plugin-vue-images"'.
Switch to Vite 2 project or use an alternative image auto-import plugin.
Verify the image file is in one of the dirs, has an allowed extension, and the name matches after PascalCase conversion.