Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
I

is-image

> 编程语言
Open source

Check if a file path is an image

100 stars0 likes1 views
WebsiteGitHub

About

Check if a file path is an image

is-image

Check if a file path is an image

It just checks the extension. Use image-type if you want to check the actual file.

Install

bash
npm install is-image

Usage

javascript
import isImage from 'is-image';

isImage('source/unicorn.png');
//=> true

isImage('source/unicorn.txt');
//=> false

Related

  • image-extensions - List of image extensions
  • image-type - Detect the image type of a Buffer/Uint8Array
  • is-text-path - Check if a filepath is a text file
  • is-binary-path - Check if a filepath is a binary file

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

JavaScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 18, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言