SSR/NextJS Support for React SDK
I'm quite new to Cloudinary, so do bear this in mind.
I've been reviewing docs, and can't find a straightforward solution to the following problem.
The goal is to utilize React V2 SDK in NextJS environment.
NextJS renders both server and client.
Because of this, plugins/packages/modules from "@cloudinary/react" break.
The main reason why I'd love to utilize the SDK is the plugins.
Below doesn't work well either.
{typeof window !== "undefined" &&
typeof window.navigator !== "undefined" && (
<AdvancedImage
cldImg={myImage}
plugins={[
lazyload(),
responsive(),
accessibility(),
placeholder(),
]}
/>
)}
1
-
Hi Maddy,
Thanks for reaching out.
Would you share with us the code that results in an error, what is the error and a stack trace will be helpful for us to investigate the issue?
Thanks,
Mo
0
Post is closed for comments.
Comments
1 comment