Refact: Remove mapping by image source, use image directly.

There were mixed mappings, some function were using source, some the actual image as a key. Now the actual image is used consistently