Here is a useful Shortcut workflow for the Share menu that imports the selected image or image file into the current OmniGraffle document.
Available by tapping the Shortcuts Share menu item 1 in the Photos app or the Files app when an image or image file is selected, and then the “Place Image in OmniGraffle” shortcut 2 in the list of available shortcuts. (see below)
The workflow will scale the image copy to the percentage value you choose, and then place the scaled version in either the currently selected graphic solid or a newly created gra[hic that is sized-to-fit the scaled image.
The Place Image Script
The Omni Automation script performs the following two functions:
Convert the encoded image data passed into it by the workflow into an image
Place the image into either the already selected single shape or a new shape sized to fit the passed image
A percent-encoded version of the script containing a text placeholder for the image data is inserted into the shortcut workflow as the contents of Text action.
02 During the execution of the shortcut, the text placeholder “XXXXX” is replaced with the image data in base64 encoded format. This statement uses the fromBase64() of the Data class to convert the encoded data into image data stored in the variable imageData.
05-16 If a single solid shape is currently selected, the image is placed in the selected shape 06 , otherwise a new shape containing the image is created and sized to fit the image 08-15
The Shortcut Workflow
The following image capture shows the Shortcut workflow that is triggered fro the Share sheet.