[api/views] Implement new image DB work

This almost certainly does not work as intended, I've had some
troubles getting the build image to work, but it's something.