handle image error

when loading images that are 4xx or 5xx or raise error for some reason, the callback never fires and breaks implementations because they hang. this changes the callback signature to `fn(err, img)` so it's backwards incompatible and the version needs to change.