It is odd because that text should come from the filename. Let me see what happens with a filename I intentionally add a ] character to:
![pic]|550x404](upload://xyEF7z3PW8gPseTwSnNbsakqy1G.jpg)
yes that definitely causes it, the filename was
pic].jpg cc @vinothkannans – so I would strip [ and ] from filenames when building the alt text please.