- Added some image source selection logic