Add onerror handling for img/video loading.

I think it is OK.  We can set the src at anytime after this img element is created.