Add onerror handling for img/video loading.

This cleanup looks good.