Disable OS X Mail inline image attachments

How to disable OS X Mail inline image attachments by default to make attachments compatible with Microsoft Exchange using the following shell commands.

Make view as icon default behaviour

Restore default behaviour