Fixed NSFW image blur spilling outside the preview

* Hide overflow of wrapping picture element
  to contain the blur of the inner img element.
* This aligns the visible image area to the
  clickable area.
* fixes #1245
This commit is contained in:
Florian Heft 2023-06-14 10:09:21 +02:00
parent f61037f5d8
commit 14775734fa
2 changed files with 4 additions and 1 deletions

View file

@ -434,3 +434,6 @@ br.big {
em-emoji-picker {
width: 100%;
}
.overflow-hidden {
overflow: hidden;
}

View file

@ -22,7 +22,7 @@ export class PictrsImage extends Component<PictrsImageProps, any> {
render() {
return (
<picture>
<picture className="d-inline-block overflow-hidden">
<source srcSet={this.src("webp")} type="image/webp" />
<source srcSet={this.props.src} />
<source srcSet={this.src("jpg")} type="image/jpeg" />