Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Thijs Moonen

macrumors member
Original poster
Aug 22, 2011
58
2
Hi MacRumors,

I remember a few MacOS versions back I was able to force Mail to always display files like pdf and image files as an icon.

I don't know how to do that in the current version of MacOS. I am running 12 Monterey.

Do you know how to do this?

Thanks for your help, as always!
 
What version of macOS exactly?

single-page PDFs and images are shown in Apple’s Mail per default. If you want a single-page attachment to appear as an icon rather than “in place” just Ctrl-click on the attachment and choose “View as icon.”

To set this as default open a terminal and execute

defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

but this might be subject to change depending on what macOS version your running.
 
Thanks for the response. I am running 12.4

I remember using the command, or one like it, in the past. I just tried it again; execute and reboot the machine. It does not do the trick.

And yes, the question is about having all attachments appear as icons by default.
 
Thanks for the response. I am running 12.4

I remember using the command, or one like it, in the past. I just tried it again; execute and reboot the machine. It does not do the trick.

And yes, the question is about having all attachments appear as icons by default.
the terminal command should set that. First you have to quit Apple Mail… 🙃
 
this applies to new outgoing emails, but not for incoming. Try sending an email to yourself, it will come back with attachements shown with preview.
 
the terminal command should set that. First you have to quit Apple Mail… 🙃
Is there a different terminal command for OS 13 to make attachments display as icons by default. The terminal command did not work for me on Mail 16 running on OS 13.
 
Oh, nevermind. I just discovered that Terminal needs full disk access. Changing that enabled the command to work, and then of course I changed it back to avoid future mistakes...lol.

Original post:

Late to the party, but.... so I did the above terminal command before the holidays as I could not get something to send the way I wanted it to look (I know, I have no control over the recipient's set-up). However, I am now trying to revert it. Just using the command with either no or false at the end does not seem to work. I do not have "always insert attachments at end" checked, nor the Microsoft option. Any thoughts on how to get this back to the usual way? Here is the code for forcing the attachment vs inline embedding. TIA!

Note: I have seen both bool and boolean in the way people write this command. Does it matter. Also, are commands like this case-sensitive, ie no vs NO?

(Update: I have also power-cycled the computer and I turned Mail off before I did the terminal command.)
defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes
 
Last edited:
Oh, nevermind. I just discovered that Terminal needs full disk access. Changing that enabled the command to work, and then of course I changed it back to avoid future mistakes...lol.

Original post:

Late to the party, but.... so I did the above terminal command before the holidays as I could not get something to send the way I wanted it to look (I know, I have no control over the recipient's set-up). However, I am now trying to revert it. Just using the command with either no or false at the end does not seem to work. I do not have "always insert attachments at end" checked, nor the Microsoft option. Any thoughts on how to get this back to the usual way? Here is the code for forcing the attachment vs inline embedding. TIA!

Note: I have seen both bool and boolean in the way people write this command. Does it matter. Also, are commands like this case-sensitive, ie no vs NO?

(Update: I have also power-cycled the computer and I turned Mail off before I did the terminal command.)
I'm still looking for a solution to this.

Could you specify how to give the Terminal full disk access so I can make it work? THANK YOU
 
I realize this is an old post but I was searching for a solution to the same question about attachments in the mac mail app. I learned that the command posted by Startibart in Aug 2022 works well for me. I am running Ventura 13.3.1 on Mac Mini M1.
 
  • Like
Reactions: Thijs Moonen
As of May 4, 2023 the proposed Terminal statement does not seem to work on Ventura 13.3.1 (a). I quit e-mail, ran the Term command: defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

and restarted mail AND rebooted mac-mini M1.

On an incoming e-mail, there are 4 single page pdf attachments that are displayed as images and a multipage pdf and excel workbook that are displayed as icons.

Neither Ctrl-left click nor Right click menu provides an option to view as icon.

Edit in the Mail menu bar is configured to "always send Windows-Friendly Attachments".

What's even more confusing is that the attachments in this incoming e-mail are at the end of a Thread that has 3 previous e-mails included, so I've got to scroll to the bottom of the e-mail to what attachments are included. Fortunately, the sender told me that there were 6 attachments, or I would have missed the icons which were randomly interspersed among the "one page views". This e-mail was sent to Outlook.com account, which if viewed in browser shows attachments (icons) at top of message. On i-phone the single page pdf's show at the end of the thread as images, but the larger pdf and spreadsheet show as icon.

Back to the question: Can someone identify something wrong with the Terminal statement above that seemed to work in Aug 2022, but no longer in May 2023?
 
Set Full Disk Access for Terminal and a couple of other apps, but others are off. Ran the Terminal command; checked mail, no help. Rebooted, verified Term has Full disk access, ran Terminal command again. Still no luck. This is just a minor aggravation, but you'd think that if it works on other computers it would work on mine. Thanks for the suggestions.
 

Attachments

  • Screenshot 2023-05-05 at 8.43.23 PM.png
    Screenshot 2023-05-05 at 8.43.23 PM.png
    80.5 KB · Views: 379
Hi, I found this discussion searching for the issue at stake. Terminal command with Full Disk Access worked on 10.14.6 only once, when I dragged a few jpeg files on new message window. Then I sent this message to one of my e-mail addresses. Both message sent and received showed attachments with preview. Ctrl-click > Show as icon is utterly worthless: it works once, sometime twice, then previews show up.
 
What version of macOS exactly?

single-page PDFs and images are shown in Apple’s Mail per default. If you want a single-page attachment to appear as an icon rather than “in place” just Ctrl-click on the attachment and choose “View as icon.”

To set this as default open a terminal and execute

defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

but this might be subject to change depending on what macOS version your running.
Hello, I did this but now I cant view my Signature since its a .jpg, I would like to go back to what it was once, its not a big deal to select view as icon if needed. I tried this code but didn't work defaults write com.apple.mail EnableInlineAttachmentViewing -bool yes

Is there another code I need to use?
 
Hi,

with this command, you'll enable adding attachments to the email body as icons
Code:
defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

with this command, you'll reverse it to the default state
Code:
defaults write com.apple.mail DisableInlineAttachmentViewing -bool no

Tested on macOS Sonoma.

Don't forget to allow Full Disk Access for Terminal.app in System Settings > Security and Privacy > Full Disk Access


Unfortunately, I can't find a way to make this work in mailboxes (inbox, sent etc.) The code above works just when you compose a new message.
 
Overall, I love Apple's Mail app. But little things like this just tick me off. That, and not having the ability to set a time interval for clicking on an email in the list and not having it marked as Read for X amount of seconds.

And while there is a paid plugin available that would give me that "read status" fix right now, it won't work in macOS moving forward because Apple is killing all existing Mail plugins in Sonoma. It was already hard for devs to write plugins for Mail, now Apple is making it even harder.
 
For anyone finding this thread in the future, remember that the Terminal command only works when composing emails. Incoming mail, and viewing old emails in mailboxes will always show single-page PDFs as previews.

Of course, there's always Apple's Feedback website for those of you who want to give them a piece of your mind. 😎

 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.