Picture src is assigned to it through js.
Picture failed to load automatically modify its suffix.
but console will type a lot of error prompts, look unaccustomed, affecting debugging. As shown in the figure below
how to use try catch to shield error prompts?
or how to prevent an image from displaying an error message when it fails to load?