link fe: properly downscale wide images to fit screen
We no longer downscale to 500px wide, but rather however wide fits
within the container, and doesn't exceed 500px in height.
@@ -74,9 +74,8 @@ export class LinkPreview extends Component {
if (imgMatch) {
embed = <a href={props.url}
target="_blank"
- className="db m0a"
style={{width: "max-content"}}>
- <img src={props.url} style={{maxHeight: "500px", maxWidth: "500px"}}/>
+ <img src={props.url} style={{maxHeight: "500px", maxWidth: "100%"}}/>
</a>
}
@@ -97,7 +96,7 @@ export class LinkPreview extends Component {
return (
<div className="pb6 w-100">
<div
- className={"w-100 " + (ytMatch ? "embed-container" : "")}>
+ className={"w-100 tc " + (ytMatch ? "embed-container" : "")}>
{embed}
</div>
<div className="flex flex-column ml2 pt6">
