astro-imagetools icon indicating copy to clipboard operation
astro-imagetools copied to clipboard

[Feature request] Lower level API

Open m4rrc0 opened this issue 2 years ago • 2 comments

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. :)

m4rrc0 avatar Jun 07 '22 12:06 m4rrc0

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.

RafidMuhymin avatar Jun 07 '22 15:06 RafidMuhymin

Awesome! Seems exactly what I was looking for! 🎉😍 Take your time. No rush on my side at least. 😉

m4rrc0 avatar Jun 09 '22 09:06 m4rrc0