Designed 2 Use...

Cheshire Web Development

07810 640 239

  • Home
  • About
  • App Development
  • Scripts
  • Basket
  • Contact
“Organise Media by Date — PowerShell Script” has been added to your basket. View basket
Batch Resize & Convert to WebP — PowerShell Script

Batch Resize & Convert to WebP — PowerShell Script

Free

Quickly resize and convert your images to WebP format in bulk. This PowerShell script processes an entire folder of images, shrinking the longest edge to a maximum size (default 1600px) while preserving aspect ratio, then outputs optimised WebP files. Perfect for preparing images for the web.

Free download — if you find it useful, consider supporting development

Categories: PowerShell, Script
  • Description
  • Reviews (0)

Description

Quickly resize and convert your images to WebP format in bulk. This PowerShell script processes an entire folder of images, shrinking the longest edge to a maximum size (default 1600px) while preserving aspect ratio, then outputs optimised WebP files. Perfect for preparing images for the web.

Features

  • Batch processes PNG, JPG, JPEG, and TIFF files
  • Resizes so the longest edge fits your chosen limit (default 1600px) — never upscales
  • Converts to WebP with configurable quality (default 80)
  • Outputs to a `webp` subfolder, keeping originals safe
  • Optional `-DeleteOriginals` flag to remove source files after conversion
  • Reports file size savings for each image

Usage

Process current folder with defaults (1600px max, quality 80)

resize-media.ps1

Specify a folder, custom quality, and max edge

resize-media.ps1 -Folder "C:\Photos" -Quality 90 -MaxEdge 1200

Delete originals after successful conversion

resize-media.ps1 -DeleteOriginals

Requirements

  • Windows with PowerShell 5.1 or later (included with Windows 10/11)
  • ImageMagick — free, open-source image toolkit

Installing ImageMagick

  1. Download the installer from [https://imagemagick.org/script/download.php#windows](https://imagemagick.org/script/download.php#windows) — choose the top “Win64 dynamic” `.exe` installer.
  2. Run the installer. On the “Select Additional Tasks” screen, make sure “Add application directory to your system path” is checked.
  3. Restart any open terminal/PowerShell windows.
  4. Verify by running: `magick –version`

Running PowerShell Scripts

If you haven’t run PowerShell scripts before, you may need to allow it once. Open PowerShell as Administrator and run:

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser

Then navigate to the folder containing the script and run it.

Adding the Script to Your PATH (Optional)

For convenience, you can add the folder containing the script to your system PATH so you can run it from any directory:

  1. Press Win + S and search for “Environment Variables”
  2. Click “Edit the system environment variables”
  3. Click Environment Variables at the bottom
  4. Under User variables, select Path and click Edit
  5. Click New and paste the full path to the folder where you saved the script (e.g. `C:\Scripts`)
  6. Click OK on all dialogs
  7. Restart any open terminal windows

You can now run `resize-media.ps1` from anywhere without navigating to the script’s folder first.

Free download — if you find it useful, consider supporting development

 

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Related products

  • Convert PNG to WebP — PowerShell Script

    Convert PNG to WebP — PowerShell Script

    Free
    Add to basket
  • QR Code Generator — PowerShell Script

    QR Code Generator — PowerShell Script

    Free
    Add to basket
  • Organise Media by Date — PowerShell Script

    Organise Media by Date — PowerShell Script

    Free
    Add to basket
  • GoPro Video Join & Compress — PowerShell Script

    GoPro Video Join & Compress — PowerShell Script

    Free
    Add to basket

Contact me on 07810 640 239 or on [email protected]

© Designed 2 Use a web development company based in Cheshire, UK
Part of The John Hulme Partnership Ltd

We are using cookies to give you the best experience on our website.

You can find out more about which cookies we are using or switch them off in .

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

Strictly Necessary Cookies

Strictly Necessary Cookie should be enabled at all times so that we can save your preferences for cookie settings.

Cookie Policy

More information about our Cookie Policy

Powered by  GDPR Cookie Compliance