How to load default image on Twitter?
巴扎黑
巴扎黑 2017-05-19 10:27:20
0
2
597

On Twitter, if the image is not loaded, a default image will be displayed. I checked that this is not the background image in the background-image attribute, but img## Pictures introduced with the #tag.

The question is, how does Twitter determine that the image that should be displayed failed to load?

巴扎黑
巴扎黑

reply all(2)
刘奇

You should check out Twitter’s developer API. There should be an introduction in it

大家讲道理

You can use the onerror event of the img tag

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!