Moved image loading code to uploader.