fixed bug where images where being read as utf-8 instead of binary