After some trial and errors I found the solution it might be not efficient enough but it's helpful so far
=IF(ISTEXT(A1);A1&".jpg")
You can replace ".jpg" with anything you'd like to add to the end.
Same for Prefix
=IF(ISTEXT(A1);"prefix"&A1)
Please note the blank cells will be filled with FALSE to remove that use notepadd++ and replace all FALSE with \n to keep lines static