javascript determines whether a string is an image path?
I have an uncertain string: it could be: http://www.baidu.com
(for url address path)
or it could be: https://img.codeshelper.com/upload/img/2021/02/28/pk4nm4innyg1209.png
(for picture)
how can I tell if this string is a picture?