Added support for attachments and images