Fall back from server generated thumbnail to original image (#10853)
* Add test for falling back from thumbnail to original * Fall back from server generated thumbnail to original image
This commit is contained in:
committed by
GitHub
parent
82e32035fd
commit
949557b5c6
@@ -165,6 +165,14 @@ export default class MImageBody extends React.Component<IBodyProps, IState> {
|
||||
};
|
||||
|
||||
private onImageError = (): void => {
|
||||
// If the thumbnail failed to load then try again using the contentUrl
|
||||
if (this.state.thumbUrl) {
|
||||
this.setState({
|
||||
thumbUrl: null,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
this.clearBlurhashTimeout();
|
||||
this.setState({
|
||||
imgError: true,
|
||||
|
||||
Reference in New Issue
Block a user