We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c0cc602 commit 98b13d9Copy full SHA for 98b13d9
.changeset/wild-jobs-explain.md
@@ -0,0 +1,5 @@
1
+---
2
+"@nextui-org/use-image": patch
3
4
+
5
+fix Image ReferenceError in SSR
packages/hooks/use-image/src/index.ts
@@ -122,7 +122,7 @@ function setImageAndGetInitialStatus(
122
if (!src) return "pending";
123
if (ignoreFallback) return "loaded";
124
125
- const img = new Image();
+ const img = document.createElement("img");
126
127
img.src = src;
128
if (crossOrigin) img.crossOrigin = crossOrigin;
0 commit comments