Parsing or decoding .pluginPayloadAttachment files? Messages.app now stores links in the sqlite attachment database as files with ".pluginPayloadAttachment" extension.

I have no idea how to parse these.  Running them through xxd reveals some indecipherable binary/hex, except for an ASCII string at the top, "ICC_PROFILE", which I assume refers to color profiling, since "RGB" appears shortly after.
The pluginPayloadAttachment extension doesn't actually convey the type of the file, unfortunately. Depending on the file, you may be able to glean the type from the byte data it begins with. Some common types you might run into are listed here:




Byte Array
Type




89 50 4E 47 0D 0A 1A 0A
PNG Image


FF D8 FF
JPEG Image


47 49 46 38
GIF Image


49 49 2A 00 or 4D 4D 00 2A
TIFF Image