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:
parent
82e32035fd
commit
949557b5c6
2 changed files with 44 additions and 1 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue