add automatic references for imageboxes