Hi Jabson,
Let me know if this thread helps:
Youโre correct to think we should do it in a view model or somewhere else besides the viewcontroller. In the chapter after this we use the factory pattern to switch these images, so for tutorial purposes we leave it in the viewcontroller to minimize the amount of refactoring you as the reader have to do.