aboutsummaryrefslogtreecommitdiff
path: root/content/notes/2023-06-04-bulk-make-thumbnails.md
blob: 7922df0dded3054d535c9f82389871d025b5cecf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
title: "Bulk thumbnails"
url: bulk-make-thumbnails.html
date: 2023-06-04T20:46:56+02:00
type: note
draft: false
---

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
```