define Attachment model
rename Attachment#type -> Attachment#mime
save attachments
add column Attachment#is_image
encode attachments using base64, isolate images from attachments
publish with images/attachments
fix a bug around base64