If an image had extra classes (for example oneboxes), then while loading the copy of the image would lose those classes and look differently until the image had loaded fully. This fix copies the classes while loading.