How to revert this defaults write command?
When you’ve written a boolean value, you can choose to write the opposite value, replacing yes with no. Usually, to reset a preference, you delete the preference so the default takes effect, which you can do with defaults delete:

defaults delete com.apple.mail DisableInlineAttachmentViewing