TL;DR
Use \ls
or ls --color=never
to get uncolored files list
Failing command...
for f in $( ls *.JPG ); do convert -resize 1920x $f re_$f ; done
... becomes
for f in $( ls --color=never *.JPG ); do convert -resize 1920x $f re_$f ; done
Details
I got same error, due to colored output of ls
command :
Error I got (in french):
$ for f in $( ls *.JPG ); do convert -resize 1920x $f re_$f ; done
convert: pas de délégué pour décoder ce format d'image `JPG' @ error/constitute.c/ReadImage/501.
convert: pas d'images définies `IMG_5235.JPG' @ error/convert.c/ConvertImageCommand/3210.
convert: impossible d'ouvrir l'image `IMG_5236.JPG': Aucun fichier ou dossier de ce type @ error/blob.c/OpenBlob/2712.
Filenames are colored like in this screenshot :

My ls
command is aliased to a ls --color=auto
which leads convert file parameters to contain color sequences.
Disable ls
colored output by using \ls
:
for f in $( \ls *.JPG ); do convert -resize 1920x $f re_$f ; done
or :
for f in $( ls --color=never *.JPG ); do convert -resize 1920x $f re_$f ; done
Then convert may not give previous errors.
Hope this can help.
convert -version
. See the comment in the MPEG section of imagemagick.org/script/formats.php#supported