modifying a regular expression in order to encode only the images marked with encode-image