I added images to all NSMenuItems in my app on macOS 26. Now, with macOS 27 beta 1, most of them are no longer displayed, which seems to be the behavior of NSMenuItem.ImageVisibility.automatic.
However, this only happens for images initialized with NSImage(systemSymbolName:accessibilityDescription:). Images initialized with NSImage(named:) are still shown, despite the visibility setting being .automatic.
What would be an approach that is consistent for all app-contributed NSMenuItems while still respecting the system default? Even more, how would one set image visibility to also address possible future system settings that decide on menu-item image visibility?
As a side note, the documentation for NSMenuItem.ImageVisibility has no description for .automatic, and the documentation for .hidden and .visible seems wrong or misleading (or I'm misunderstanding):
.hidden:
The item image should always be visible. Note that in some cases, AppKit may still hide the image, overriding this preference.
.visible:
AppKit should choose whether the item’s image is visible, considering the system configuration.
This behavior was chosen to provide the best compatibility with existing apps. Symbol images used for menu items are still a (relatively) new feature for macOS apps; many applications historically used non-symbol images for menu items, long before the macOS Tahoe UI recommendation to use symbol images for most or all menu items. Generally, apps using non-symbol images for menu items have made an explicit choice that those items should have visible images, and therefore AppKit keeps them visible.