Bugs of removing background action in macOS Shortcut App

I use the remove background action in my workflow and found the remove background returns me nothing.Steps for reproduction:

Device and OS Version: MBA2022 M2, macOS 13.4.1

Just to note it is generally better to share a link to a shortcut rather than a screenshot as a screenshot rarely tells the whole story, and people then have to do their best to reproduc it in order to help you test it.

This works for me on IOS, give it a try on your Mac and see what results you get.


Thanks for the reply! I realized I got a mistake in the question as I didn’t input the image to the remove background action. The shortcut you provided works well. I double-checked my original shortcut and I found the problem remains.
This is the original shortcut that I encountered the problem. The function of this shortcut is to add an icon to the macOS folder with the native style by executing folderify command through shell. It needs a png mask with transparent background. So I use the ‘remove background’ action as pre-processing, but it did not return any output.

I suspect this quirk is due to the ‘if’ statement. Another shortcut of mine has a similar problem, the ‘replace text’ action returned nothing in the ‘if’ statement. But it returns me a text if I put it outside of ‘if’.

Using an Intel MacBook Pro running macOS 13.4.1, it works fine for me; well up to the point of the Folderify script which I don’t have installed, but the script looks logical.

For me I triggered the shortcut as a quick action from a folder selection in Finder, I selected an image file ( I just used a simple PNG of a Shortcuts shortcut icon), the image was displayed, and then the processed image (background removed) was displayed.

If that isn’t working for you, then maybe there is something about your image?

In case it is useful, here is a link to the PNG file I tested with so you can see if that works for you.

What happens if you just build a test shortcut to select an image and then show it after background removed? Does that work for any images you have or the test image I used and linked to above?

Thanks, bud! Your test image worked out! I also try my image and as we discussed previously, got no output from the “remove background” action. The cause of this problem was my image. The “remove background” action failed to segment the object in my image and return empty.

The Shortcut definitely has a large room for improvement. It’s a pain to debug without knowing the quirks of it.