Use the given database instead of the core to load images.