Bind 'error' and 'abort' events to img element.