aboutsummaryrefslogtreecommitdiff
path: root/content/notes/2023-06-04-bulk-make-thumbnails.md
blob: d3a7d621119b9b10417af42a2cb0241c71cf350c (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
```