Camera files come as IMG_1234.JPG, phone files as img_1234.jpg, and a loop over *.jpg silently skips half of them.
Bash can match file names without caring about case:
shopt -s nocaseglob
for f in *.jpg; do
echo "resizing $f"
done
Now *.jpg matches .jpg, .JPG and .Jpg. The option affects every glob after it in that shell, so in a script it covers the whole rest of the script.
I like it more than writing *.[jJ][pP][gG], which works but reads like a captcha.
Turn it off again with shopt -u nocaseglob if later parts of the script expect exact matches. On macOS the default filesystem already treats a.jpg and A.JPG as the same file, but bash matching itself still cares about case there too, so the option helps on a Mac as well.
There is a sibling, shopt -s nocasematch, for case statements and [[ ... == ... ]] tests, which this one does not touch. And zsh has its own way, with setopt NO_CASE_GLOB.
Further reading: Bash manual: The Shopt Builtin