Fix bug where images were all replaced with first image (was using text, i.e. first match, as opposed to individual matches)