Quite self explaining, a dialog appears to choose the resize level (values: 25%, 50%, 75%), then in the working directory is created the resized folder in which each pictures is put resized and converted to .jpg.

Make it executable

chmod +x ~/.config/Thunar/custom_actions/picture_resize.sh

Open Thunar and select Edit => Configure custom actions… and edit as shown, the path to the script is

/home/cesare/.config/Thunar/custom_actions/picture_resize.sh %N

In the tab Appearance Conditions select only Image Files and File Pattern: *