Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To generate the dist folder using the thumbnails in the src/assets/thumbnails/name/ directory with Vite, follow these steps:

  1. Import the images from the assets folder in your component or module.
import yourImage from '@/assets/thumbnails/name/yourImage.jpg';
  1. Use the imported image in your component or module.
<template>
  <img :src="yourImage" alt="Your Image"/>
</template>
  1. When you build the application, Vite will automatically generate the dist folder with the optimized images.
npm run build
  1. You can find the optimized images in the dist/assets/thumbnails/name/ directory.