In my Notification Service Extension I am downloading an image from a URL to show as UNNotificationAttachment in a notification.
So I have
From UIImage it seems that it is not possible, all the solutions that I found were downloading the image and store it somewhere locally. Also makes sense because you would have to import UIKit and not sure if it is compatible with extensions (and why import a whole framework when there are simpler solutions).
Here is a simpler and testable solution and without the need of using a FileManager.