lorenzodejong / next-sanity-image

Utility for using responsive images hosted on the Sanity.io CDN with the Next.js image component.
MIT License
149 stars 20 forks source link

Next 13 support #46

Closed dRect911 closed 1 year ago

dRect911 commented 2 years ago

If it's possible may we have a support for next 13?

jimCresswell commented 2 years ago

I've opened a naive PR, but given some people already appear to be using this library with Next 13 I believe it's an overall improvement.

lorenzodejong commented 2 years ago

I haven't had time to test the implementation against Next 13 yet, is the library fully compatible with the newly introduced API in Next 13?

jimCresswell commented 2 years ago

I don't know yet, I'm in the process of updating a large Typescript application to Next 13 and React 18. Once the types are sorted out, I should be able to test application behaviour. We don't use all the next-sanity-image features so it wouldn't be an exhaustive test.

jimCresswell commented 2 years ago

Our update to Next 13 is proving challenging. We'll test once we can, but you might be in a position to verify sooner.

ianmartorell commented 2 years ago

I'm currently using it on a Next 13 project and it works, except for the blur placeholder - as reported in #44

lorenzodejong commented 1 year ago

I've tested the library using Next 13, it seems to be correctly compatible. I've integrated the PR from @jimCresswell and updated the documentation. Version 5.0.0 has just been released.

The reason for a major update is caused by the dropped support for blur up options. Check out the upgrade guide for more information https://github.com/bundlesandbatches/next-sanity-image#upgrading-from-4xx-to-5xx.

If there are any issues with the upgrade, feel free to re-open or create a new issue!

jimCresswell commented 1 year ago

@lorenzodejong thank you so much! That is very helpful!

cc @mantagen