Bash script to resize, strip metadata and optimize images.
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-07-22 23:38:02 +02:00
LICENSE Initial commit 2025-05-23 16:04:58 +02:00
README.md Update Readme 2025-05-25 08:05:46 +02:00
web_optimize_img.desktop Update service menu icon 2026-07-22 23:38:02 +02:00
web_optimize_img.sh Initial commit 2025-05-23 16:04:58 +02:00

web_optimize_img

Bash script to resize, strip metadata from, and optimize images. It can be used to prepare images for Web publishing. Supports JPEG, PNG and SVG.

Intro

This script uses file list as an input and can be invoked from command line or from file manager. You can configure preferred output image size in web_optimize_img.sh:

SIZE="1920x1920\>"  # '\>' stands for downscale only.

See ImageMagick help for more details.

You can also customize output file name prefix:

PREFIX="opt_"

Requirements

In Arch Linux those can be installed with

sudo pacman -S imagemagick jpegoptim zopflipng svgo

Command line use

web_optimize_img.sh photo.jpg scheme.png logo.svg

Dolphin intergration

Edit web_optimize_img.desktop and adjust Exec key to use your path to web_optimize_img.sh.

Copy web_optimize_img.desktop to ~/.local/share/kio/servicemenus/. The context menu item will then be shown for supported image formats.

License

GNU General Public License 3.0