From 4abcce013c9ee3053badf2abda77190233066676 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Fri, 23 Feb 2024 10:35:22 +0100 Subject: Testing thoughts page --- _posts/notes/2023-06-04-bulk-make-thumbnails.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 _posts/notes/2023-06-04-bulk-make-thumbnails.md (limited to '_posts/notes/2023-06-04-bulk-make-thumbnails.md') diff --git a/_posts/notes/2023-06-04-bulk-make-thumbnails.md b/_posts/notes/2023-06-04-bulk-make-thumbnails.md new file mode 100644 index 0000000..0a502a9 --- /dev/null +++ b/_posts/notes/2023-06-04-bulk-make-thumbnails.md @@ -0,0 +1,22 @@ +--- +title: "Bulk thumbnails" +permalink: /bulk-make-thumbnails.html +date: 2023-06-04T20:46:56+02:00 +layout: post +type: note +draft: false +tags: [bash] +--- + +Make bulk thumbnails of JPGs with ImageMagick. + +```sh +#!/bin/bash + +directory="./images/" +dimensions="360x360" + +for file in "$directory"*.jpg; do + convert "$file" -resize $dimensions "$file" "${file%.*}-thumbnail.jpg" +done +``` -- cgit v1.2.3