astro-imagetools
astro-imagetools copied to clipboard
[Feature request] Lower level API
It would be nice to have a lower level / less opinionated API.
Currently renderImg
and other API functions only return the (opinionated) markup. Sometimes we just need info about the generated assets so we can create or own markup.
Having this tool download and optimize an image so easily is already very powerful and sometimes all we need.
I haven't been digging much in the code base but I am sure the function I need is in api/utils already. It would be extra nice to expose it. :)
Nice proposal @m4rrc0 ! It's already on the roadmap but the progress is too slow. I will try to work on it soon. The intention is to export the getImage
utility.
Awesome! Seems exactly what I was looking for! 🎉😍 Take your time. No rush on my side at least. 😉