image category association logic