Adding srcImage.onerror handler.

This is mainly to allow the revokeObjectURL being called regardless of the image being properly loaded or no, otherwise we'd still have a memory leak.