Shortcuts problems when saving to clipboard

Is something not working like it should? Let us know.
User avatar

2022-04-18 07:13:39

Hi,
I've been struggling trying to automate one of my everyday tasks. I need to enhance resolutions on images from my clipboard and paste the result in other apps, so my typical workflow is:

- Find an image (on a website I own, via Chrome)
- Copy it to the clipboard
- Open Pixelmator
- Create a new document, from clipboard
- Activate ML Super Resolution
- Press Enter at the end
- Select all - copy the result to the clipboard
- Paste the resulting image in the other app.

I've been trying to automate this with Apple Shortcuts, with a very simple workflow:

- Get Clipboard
- Increase resolution of Clipboard
- Copy Upscaled image to Clipboard

The Shortcuts stops after enhancing the resolution, returning this error:

Could Not Run Increase Resolution of Image
The action could not be run because an error occurred while attempting to create or save to an offline Pixelmator Pro document.

If I make a screengrab of the image with a different App (Xnip), and copy it to the clipboard, the Shortcut works. But if I try the aforementions steps (copying the image with the Copy Image in the contextual menu in Chrome/Safari), it doesn't work.

I tried inserting a file conversion in my Shortcut (Get Clipboard - Convert Clipboard - Increase Resolution - Copy to Clipboard), but no matter what format I choose, the Shortcuts hangs at the conversion:

Could Not Run Convert Image
The action could not be run because one or more of the input files could not be converted to the target format.

It seems I'm missing something, any help would be appreciated, as this Shortcut could save me a ton of time everyday.

Thanks.
User avatar

2022-04-21 14:55:17

Hi Dinamite_Bla, it's possible that a URL or some other additional web data gets copied to the clipboard along with the image when copying images from Chrome/Safari. Try adding Get Images from Clipboard after the Get Clipboard action - that seems to have done the trick on my end.
User avatar

2022-04-22 10:04:47

Just did a little bit of digging and Shortcuts does indeed return an HTML file containing a link to the image when copying an image from a web browser – you can make sure of this by creating a shortcut with the following actions:

Image

Get Images from Input should certainly do the trick. Native Apple actions seem to handle this just fine without the Get Images step, so perhaps there's a simple way for us to handle this too, but nothing comes to mind just now. We'll see what we can do, though!
User avatar

2022-04-23 09:00:26

by simonasd 2022-04-21 12:55:17 Hi Dinamite_Bla, it's possible that a URL or some other additional web data gets copied to the clipboard along with the image when copying images from Chrome/Safari. Try adding Get Images from Clipboard after the Get Clipboard action - that seems to have done the trick on my end.
Thanks! I just tried and adding the Get Image command now everything seems to be working.

Excellent advice, thanks again!
User avatar

2022-04-23 09:00:48

by Andrius Just did a little bit of digging and Shortcuts does indeed return an HTML file containing a link to the image when copying an image from a web browser – you can make sure of this by creating a shortcut with the following actions:

<p><img src="//support-cdn.pixelmator.com/uploads-new/cuf_1650621777_Screen_Shot_2022_04_22_at_13.02.47.png" class="postimage is-shown is-visible" alt="Image" width="1097" height="654"></p>

Get Images from Input should certainly do the trick. Native Apple actions seem to handle this just fine without the Get Images step, so perhaps there's a simple way for us to handle this too, but nothing comes to mind just now. We'll see what we can do, though!
Thanks for your efforts!