Skip to content
A shell script that uploads/deletes images to/from IMGUR.
Branch: master
Clone or download
Latest commit 7669636 Dec 3, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.


imgurbash2 is a simple bash script that allows you to upload images to imgur. Once an image is uploaded, the link is displayed on the terminal and copied to your clipboard (see below or refer to the manual).

Tested on Linux, macOS and FreeBSD.


  • Upload remote HTTP/HTTPS images to imgur.
  • Upload multiple images at one go.
  • Upload images to your album and to your account.
  • Delete previously uploaded images.
  • Automatically images deletion.
  • Copy uploaded images' URLs to clipboard.


Upload Images

Upload the images named cow.png and fish.jpg to imgur:

imgurbash2 cow.png

The above command will output something like this: (Delete Hash = mo02q3r) (Delete Hash = blub1qx)

The outputted links are the URLs of the uploaded images. Such URLs are copied to your clipboard if the right programs are installed.

Upload To Your Album

Upload the image named cow.png to your imgur album:

imgurbash2 -l -a abc134 cow.png

Delete Images

imgurbash2 ~/tmp/test.png (Delete Hash = vgdTM62vQ08xaxa)

To delete the above uploaded image:

imgurbash2 -d vgdTM62vQ08xaxa

Automatically Image Deletion

imgurbash2 -D 5m ~/tmp/test.png

Uploaded image will automatically be deleted after 5 minutes.


More examaples and a detailed manual is available at Details about the configuration file are also explained.


Linux / macOS / UN*X

curl -O
chmod u+x imgurbash2

Arch Linux / Manjaro / Antergos

yay -S imgurbash2


Program Optional Reason
bash 4.0+ No To run this script. Given that macOS ships with an old Bash version, it is recommended that the latest Bash is installed via brew install bash
curl No Uploads images
xsel or xclip Yes Copies URL (image) link to clipboard if using Linux - no separate program is required for macOS


MIT License

You can’t perform that action at this time.