forked from Archives/Athou_commafeed
if width is specified, keep images aspect ratio (#1595)
This commit is contained in:
@@ -70,7 +70,11 @@ export function ImageWithPlaceholderWhileLoading({
|
||||
width={width}
|
||||
height={height}
|
||||
onLoad={() => setLoading(false)}
|
||||
style={{ ...style, display: loading ? "none" : (style?.display ?? "initial") }}
|
||||
style={{
|
||||
...style,
|
||||
display: loading ? "none" : (style?.display ?? "initial"),
|
||||
height: style?.width ? "auto" : style?.height,
|
||||
}}
|
||||
/>
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user