prevent choking on invalid utf-8, and handle image thumbnailing smarter
prevent choking on invalid utf-8, and handle image thumbnailing smarter

TribeMedia/synapse,matrix-org/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,matrix-org/synapse,matrix-org/synapse,TribeMedia/synapse,TribeMedia/synapse,matrix-org/synapse