Move image object creation into a method for easier subclassing.