If you want this shortcut to work even with Live images made with iPhone, you need to change the recipe by converting the image first:
With iOS 12, Apple took previously acquired Workflow app and made it to Shortcuts.
If you have Workflow installed previous to the iOS 12 update, it will retain the original state until you actually update it via App Store. Without the update, the Workflow won’t work in some cases on iOS 12, so you’re basically forced to update the app anyway.
But before you burst into tears, read this.
Apple integrated Workflow into the iOS so it can now do more. You can for example ask Siri to resize your last taken image. I have prepared the recipe for that which also checks the image orientation and resize it accordingly.
Here’s the recipe:
Now all you have to do is ask 🙂