Don't display the image until its fully loaded
Fit image to container
Use div in test page instead of document.body