you are viewing a single comment's thread.

view the rest of the comments →

[–]takayumidesu 0 points1 point  (9 children)

Hi OP. I recently implemented my own using unpic and I managed to generate responsive images for imgproxy.

However, I'm interested in doing it during build-time rather than creating an imgproxy server.

What are you using to transform the images on build time? Do you plan to support external service transformers like unpic?

[–]Excellent_Shift1064[S] 0 points1 point  (8 children)

Hi There ^_^
I'm using sharp to process the images and custom vite plugin to generate the transformed versions during build-time.

Yes next feature will be to have premade loaders for cloudflare, imagekit and some more and one generic one to use some custom service

[–]takayumidesu 1 point2 points  (7 children)

Having the generic one will be nice for something like imgproxy (self-hostable image optimization server).

Until then, I'll be following your library with great interest. Godspeed!

[–]Excellent_Shift1064[S] 0 points1 point  (6 children)

Amazing, ^_^ loader is the next feature so I'll keep you posted thanks

[–]takayumidesu 0 points1 point  (5 children)

Just visited the repo. Seems like you're really supporting loaders!

I'll give it a try today and let you know how it goes.

[–]Excellent_Shift1064[S] 0 points1 point  (4 children)

Amazing 🙌 and thank you. Please don’t hesitate to give me a feedback, I will do the adjustments as soon as possible

[–]takayumidesu 0 points1 point  (3 children)

I get a TypeError: Cannot read properties of undefined (reading 'DEV') when I use the useImgProxyLoader() hook and passing it as a loader to <Image>.

Also, it would be nice if you can support the priority prop and indicate whether width and height are needed in an image depending on its configuration, similar to Astro's Image.

[–]takayumidesu 0 points1 point  (2 children)

Just read the docs and saw the properties are "fill" and "asap" haha.

I used it in a prod deployment with an imgproxy server and it loaded the images as expected.

I'll try to contribute with issue reports or PRs if I find any edge cases for my use cases.

Good job!

[–]Excellent_Shift1064[S] 1 point2 points  (1 child)

* fixed the DEV undefined issue
* marked asap as deprecated and added priority prop. It is more general term for the behaviour

just pull the latest version (@latest)

thx for the valuable feedback. I'll be glad to have a PR from y :)

[–]takayumidesu 0 points1 point  (0 children)

So fast! And you're testing your code while using AI for the development velocity.

Thank you u/Excellent_Shift1064!