Fix previous commit: 'this' in Image.onload refers to the image object, but we meant the mediaManager