Checks if a given string represents an image file path with extensions such as jpg, jpeg, png, gif, webp, or avif.
isImage('dummy.jpeg')// => trueisImage('dummy.weBp')// => trueisImage('dummy.PNG')// => trueisImage('dummy.docx')// => falseisImage('/home/demo/dummy')// => falseisImage(undefined)// => false Copy
isImage('dummy.jpeg')// => trueisImage('dummy.weBp')// => trueisImage('dummy.PNG')// => trueisImage('dummy.docx')// => falseisImage('/home/demo/dummy')// => falseisImage(undefined)// => false
true if the given string represents an image file path, false otherwise.
true
false
Generated using TypeDoc v0.24.7
Checks if a given string represents an image file path with extensions such as jpg, jpeg, png, gif, webp, or avif.
Example