Recursively to catch all the pictures and those, whose resolution is more than 1280 pixels on the longest side (72dpi), respectively, reduce up to 1280 on the longest side / 72dpi.
Parsing the Internet within a few days led to the formation of the following console commands:
find /input/ -iname "*.*" -print0 | xargs -0 mogrify -resize 1280/ -quality 70 -density 72
However, it works oddly — sometimes reduces the image in accordance with my settings, and sometimes reduces to 1280pix on the smaller side. The patterns could not be detected.
Tell me where I went wrong or what the console command is better to use for my task?