$100 Website Offer

Get your personal website + domain for just $100.

Limited Time Offer!

Claim Your Website Now

Image Compression using just click – Step-by-Step Guide: Windows using imagemagick

Uncategorized

Here is a detailed, step-by-step tutorial for installing ImageMagick and making your Windows right-click “Send To” batch image compressor live—using your exact script with logging and robust filename support.​


Step-by-Step: Windows “Send To” Image Compression

Step 1: Install ImageMagick

  • Go to imagemagick.org and download the latest Windows installer.
  • Run the installer. Accept all defaults and ensure it installs formats like JPEG, PNG, TIFF, WEBP, etc.
  • Confirm installation:
    • Open Command Prompt and type: textmagick -version
    • You should see a version number and a list of supported delegates.

Step 2: Create and Copy Your Script

  • Copy below code into Notepad:
@echo off
setlocal

REM Get the input file path (argument), extension, and base name, all quoted
set "IMAGE=%~1"
set "EXT=%~x1"
set "BASENAME=%~dpn1"
set "OUT=%BASENAME%_compressed%EXT%"
set "LOGFILE=%BASENAME%_compress_log.txt"

REM Attempt compression, log output and errors
"C:\Program Files\ImageMagick-7.1.2-Q16-HDRI\magick.exe" "%IMAGE%" -resize 50%% -quality 70 "%OUT%" > "%LOGFILE%" 2>&1

REM Display log file location
echo Compression attempted for "%IMAGE%"
echo See log at "%LOGFILE%"
pause
endlocal
  • Save as: CompressImage.bat
  • Make sure the file extension is .bat (not .txt).

Step 3: Add the Script to “Send To”

  • Press Win + R, type: text%APPDATA%\Microsoft\Windows\SendTo and press Enter.
  • Copy your CompressImage.bat into this folder.

Step 4: Test the Batch Compressor

  • Open Windows Explorer, find any supported image file.
  • Right-click the image and select “Send to” → CompressImage.bat.
  • A command window will open, process the file, and close when finished.
  • You’ll find a new image named like
    filename_compressed.jpg
    in the same folder.
  • A log file named
    filename_compress_log.txt
    will be generated beside it, showing details or errors.

Step 5: Review Results or Troubleshoot

  • If compression did not occur as expected, open the log file for details.
  • Tweak -resize 50%% or -quality 70 in the script to change the compression and resizing as needed.
  • Repeat the process for other images to confirm success.

This workflow enables one-click batch compression and resizing for all major image formats, saving output and error logs for review, and works robustly for filenames with spaces, digits, or special characters.​

Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x