fixed MIME type truncation on embedded images

Except for png, embedded images were given data URIs like
data:image/mp, data:image/ng, data:image/pg instead of bmp, png, jpg.