Fixes image loading

https://bugzilla.mozilla.org/show_bug.cgi?id=1063301

(progress event sequence is still wrong)