Skip to content

Setup with Astro #13

Answered by elringus
tasesmuemils asked this question in Q&A
Jan 16, 2024 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

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

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@tasesmuemils
Comment options

@elringus
Comment options

@tasesmuemils
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by elringus
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants