decouple images controller from models