updated core to handle images and cids