I had the problem that the jpg file ended prematurely and mogrify wouldn't resize my images. My solution to this problem was to convert the images to png and back to jpg. This fixed the problem:
#!/bin/bash
mogrify -format png *.jpg
rm *.jpg
mogrify -format jpg *.png
rm *.png
There might be a quality loss due to compression artifacts, but for my purpose this was fine.