Inline base64 data so photos don't break parser

This is basically 36fbc01 from @rngtng in pull #2 but without the whitespace
noise in the commit. Also handles \r\n line endings in addition to simply \n.