Skip to content
Snippets Groups Projects
Verified Commit b8216847 authored by bree's avatar bree
Browse files

image attachments now have their width and height properly set

parent 036e9a33
1 merge request!3replace js image scaling with css for message attatchments
...@@ -40,6 +40,8 @@ export default function Attachment({ attachment, hasContent }: Props) { ...@@ -40,6 +40,8 @@ export default function Attachment({ attachment, hasContent }: Props) {
<img <img
src={url} src={url}
alt={filename} alt={filename}
width={metadata.width}
height={metadata.height}
data-spoiler={spoiler} data-spoiler={spoiler}
data-has-content={hasContent} data-has-content={hasContent}
className={classNames(styles.attachment, styles.image)} className={classNames(styles.attachment, styles.image)}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment