add context to ir.attachment