image.getInstance refactoring