415 how does (Unsupported Media Type) intercept the loading of images?

GET https://cnbj2.fds.api.xiaomi. 415 (Unsupported Media Type)

failed to load the page-side request avatar. I want to block the return. If 415 is returned, the local default avatar will be loaded, and the avatar will not be loaded frequently. How to do this intercept? -sharp-sharp-sharp problem description

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

Apr.02,2021

onerror can't use this directly. Only if the image fails to load, the default picture will be displayed


pictures all adopt lazyload so that it is possible to handle the failure of the request

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e5175d-43e5e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e5175d-43e5e.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?