Unfortunately, JPEGs don't support the addition of custom data. In order to read and write custom data, you'll need to use the .PNG file format. In addition, you must use the "IMAQ Read Image And Vision Info" and "IMAQ Write Image And Vision Info" VIs - the other VIs do not save custom data.
Good Luck,
Jeff