Setup with Astro #13
-
Hello, I need a bit of help to understand how Astro works with imgit. My astro.config.mjs looks like this:
My videos are located in
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Hi, imgit will look for md image tags ( I'd suggest to try the following:
|
Beta Was this translation helpful? Give feedback.
-
There is now an option directly import assets, so that it's possible to build custom HTML/components using sources of the optimized asset. Example for Astro page: ---
import psd from "imgit:https://example.com/photo.psd";
import mkv from "imgit:/assets/video.mkv";
---
<img src={psd.content.encoded}
height={psd.info.height}
loading="lazy"/>
<video src={mkv.content.encoded}
poster={mkv.content.cover}
height={mkv.info.height}
autoplay loop/> Documentation: https://imgit.dev/guide/asset-import |
Beta Was this translation helpful? Give feedback.
There is now an option directly import assets, so that it's possible to build custom HTML/components using sources of the optimized asset.
Example for Astro page:
Documentation: https://imgit.dev/guide/asset-import