Resizing images directly by ImageMagick

I backup all pictures I and my relatives make on Nextcloud and they already consume quite a lot of data (dozens of GB). I don’t really need the original size, so I wonder if I can reduce the size of images by 50%.
I can do it directly on the file system by ImageMagick, but I’m not sure how cool Nextcloud would with changes to files that are not done through it.
Would it be fine or is there any better way to achieve the same?

You can modify files directly in data folder, just run scan command after you finished:
sudo -u www-data php occ files:scan --path="user1/files/folder_with_modifyed_data". You also could check how you can rebuild you previews with smaller size: