Image Paths
zellwk opened this issue · comments
Imgit with Astro fetches the file from the public directory. But there are many instances where I want to fetch images from the /src/assets
directory instead (since I use Astro's image optimization tool as well). Is it possible to remove the /public
?
Example
// Passed in value
const test = await import('imgit:/asset/image.png')
// Path used now
// /absolute-path-to-project/public/src/asset/image.png
// Preferred path
// /absolute-path-to-project/src/asset/image.png
Sure, you can set the preferred root directory in the options:
imgit/src/server/config/options.ts
Lines 4 to 7 in 46f5765
This issue is stale because it has been open 14 days with no activity. It will be automatically closed in 7 days.