.gitignore for Images

32 ignore rules for Images, ready to copy into your repository.

Image and media files

The complete .gitignore for Images

# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-03-04 09:35:36 UTC
# Technologies: Images

### Images ###
*.jpg
*.jpeg
*.jpe
*.jif
*.jfif
*.jfi
*.jp2
*.j2k
*.jpf
*.jpx
*.jpm
*.mj2
*.jxr
*.hdp
*.wdp
*.gif
*.raw
*.webp
*.png
*.apng
*.mng
*.tiff
*.tif
*.svg
*.svgz
*.pdf
*.xbm
*.bmp
*.dib
*.ico
*.3dm
*.max

What these Images rules actually ignore

Every pattern below, and why it belongs in your .gitignore.

JPEG

Pattern What it ignores
*.jpg JPEG
*.jpeg JPEG
*.jpe JPEG
*.jif JPEG
*.jfif JPEG
*.jfi JPEG

JPEG 2000

Pattern What it ignores
*.jp2 JPEG 2000
*.j2k JPEG 2000
*.jpf JPEG 2000
*.jpx JPEG 2000
*.jpm JPEG 2000
*.mj2 JPEG 2000

JPEG XR

Pattern What it ignores
*.jxr JPEG XR
*.hdp JPEG XR
*.wdp JPEG XR

Graphics Interchange Format

Pattern What it ignores
*.gif Graphics Interchange Format

RAW

Pattern What it ignores
*.raw RAW

Web P

Pattern What it ignores
*.webp Web P

Portable Network Graphics

Pattern What it ignores
*.png Portable Network Graphics

Animated Portable Network Graphics

Pattern What it ignores
*.apng Animated Portable Network Graphics

Multiple-image Network Graphics

Pattern What it ignores
*.mng Multiple-image Network Graphics

Tagged Image File Format

Pattern What it ignores
*.tiff Tagged Image File Format
*.tif Tagged Image File Format

Scalable Vector Graphics

Pattern What it ignores
*.svg Scalable Vector Graphics
*.svgz Scalable Vector Graphics

Portable Document Format

Pattern What it ignores
*.pdf Portable Document Format

X BitMap

Pattern What it ignores
*.xbm X BitMap

BMP

Pattern What it ignores
*.bmp BMP
*.dib BMP

ICO

Pattern What it ignores
*.ico ICO
*.3dm 3D Images
*.max ICO

How to use this .gitignore for Images

  1. Copy the Images rules above, or download the file directly.
  2. Create a file named .gitignore at the root of your Git repository and paste the rules into it.
  3. If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
  4. Commit the .gitignore so everyone on the team shares the same rules.