Added onerror handler to _loadImage. Optional callback provided in options object.