Creating a shortcut to batch resize/convert items from the Camera Roll and post to Facebook


I’m trying to create a shortcut which will execute the following steps:

  1. Duplicate a selection of items from my Camera Roll.
  2. For each duplicated photo in the selection resize and convert to predetermined parameters.
  3. For each duplicated video in the selection resize and convert to predetermined parameters.
  4. Share the duplicated photos/videos to Facebook.
  5. Delete the duplicated photos and videos.

I can achieve step one, and I’m confident of achieving steps four and five; however, I’m running into all sorts of problems with steps two and three. Sometimes photos are converted into videos(!) which I suspect has got something to do with the fact that they’re Live Photos; other times, nothing happens.

Is anyone able to offer any advice?

Many thanks,


Please share your shortcut so we can investigate where your logic is going askew. Sounds like you might be missing a media type check or your filtering isn’t discriminating enough. But no way to know without seeing what is going on.

1 Like

@sylumer This is a link to what I have so far:

It’s rather rudimentary but is an outline of what I’m trying to achieve.

I have to say that I’ve come up against two seemingly insuperable problems. Firstly, the Shortcuts app doesn’t appear to have an action to convert video formats (hence an action opening Desqueeze, an app which currently fulfills this purpose for me), and secondly, the Facebook action doesn’t seem to allow adding a location when posting, meaning that I would need to post and then add the location later - I might as well just post directly from the Facebook app which offers this functionality.



Hopefully these adjustments should preclude videos being created from images.

I don’t use Desqueeze or Facebook so can’t test it, and can’t comment on location information for the Facebook action.

Note you have set the Shortcut to be available via the share sheet, but it did not, and does not above, use any potential input.

I’ve left as is for where Facebook is used. Notably it still uses recent photo media as a holding list. Now I assume you did it this way because Desqueeze is saving videos there rather than passing to Shortcuts. But there is nothing to pick those videos up in the Shortcut to pass to Facebook. The photos should get passed in (add Quick Look before Facebook to validate), but if that is all, then you can pass them without saving to recent, and as it stands, you are not actually ever dipping in to the recent to actually get the photos (or videos) that have been saved back. It’s like there’s a step missing.

@sylumer Thanks very much for this.

At the moment, there are two issues arising.

Firstly, the resize step does not differentiate between landscape and portrait orientation when resizing. The result is that some photos do not have their ratios respected. I’ve found a shortcut which may offer a solution, but it seems rather complex, and I won’t need all the options, e.g. the only resize I’m interested in is 2048 x 1536/1536 x 2048.

Secondly, only one image is being passed to Facebook, even though I might have processed multiple images. (Although it does now offer location as an option!) The Quick Look step tells me that multiple photos are being passed to Facebook, so maybe it’s a limitation at Facebook’s end?

If I understand you correctly, you’re also saying that I needn’t actually save the resized images to my Camera Roll at all, and that they can just be passed directly to Facebook? This step would only be needed if Desqueezed were involved.



Take a look at the various image orientation property options, or calculate the ratio between the width and the height and check which side of 1 it falls.

Sounds like a Facebook action limitation.

Yes, in that if you create/load/remake an image in a shortcut, you can use it in the same shortcut run without having to save it and load it back in. Magic variables are your always helpful around this sort of stuff.


@sylumer In the end, I created four separate shortcuts to accommodate the limitations of the Shortcuts app and the Post on Facebook action. I then created a piece of JavaScript in Drafts which maps the shortcuts to user input. Although the script seems to be functioning well, if the Facebook action is called from the share sheet, but is then cancelled, the Drafts app crashes.

I’d be interested to know what you think about this and also the script in general.