I\'m trying to automate resizing images based on their width. If the width is > 1000px I want them to be resized by 50%, if width < 1000px I want them to be resized by