install the package and the sharp image processing library using your preferred package manager:
npm install @lonik/oh-image sharp
Setup
add oh-image plugin to the plugins array
// vite.config.ts
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import { ohImage } from "@lonik/oh-image/plugin";
export default defineConfig({
plugins: [ohImage(), react()],
});
And that’s it; you’re good to go.