File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
apps/mobile/web-app/html-renderer/src/components Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ export const MarkdownImage = (props: HTMLProps<"img">) => {
53
53
} )
54
54
} }
55
55
>
56
- { image ?. blurhash && (
56
+ { image ?. blurhash && scaleWidth && scaleHeight && (
57
57
< Blurhash
58
58
hash = { image . blurhash }
59
59
width = { scaleWidth }
@@ -68,13 +68,14 @@ export const MarkdownImage = (props: HTMLProps<"img">) => {
68
68
{ ...rest }
69
69
onLoad = { ( ) => setIsLoading ( false ) }
70
70
style = { {
71
- width : scaleWidth ,
72
- height : scaleHeight ,
71
+ width : scaleWidth || undefined ,
72
+ height : scaleHeight || undefined ,
73
73
} }
74
74
loading = "lazy"
75
75
className = { clsx (
76
- "absolute inset-0 !my-0 transition-opacity duration-500" ,
76
+ "!my-0 transition-opacity duration-500" ,
77
77
isLoading && "opacity-0" ,
78
+ scaleWidth && scaleHeight && "absolute inset-0" ,
78
79
) }
79
80
crossOrigin = "anonymous"
80
81
src = { src }
You can’t perform that action at this time.
0 commit comments