How to remove the small icon in the upper left corner when the image request fails?
阿神2017-06-17 09:17:59
Give a default image. If successful, the requested image will be used. If failed, the default image will be used.
typecho2017-06-17 09:17:59
The one that cannot be removed will still exist even if the alt attribute is added. The suggestion is that when the image request fails, display a default image or a prompt image indicating that the request failed, such as: <img src='xxx' onerror="this.src='http://i1.buimg.com /1949/8c5e2086e458c12d.png'"/>
Not much to say about the path, both absolute paths and relative paths are acceptable.
黄舟2017-06-17 09:17:59
Call the error event of the image. If loading fails, a prompt or replacement image will be given