aboutsummaryrefslogtreecommitdiff
path: root/content/notes/bulk-make-thumbnails.md
blob: 7a903910906eee9d427f93327a7679076187d640 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
---
title: "Bulk thumbnails"
url: bulk-make-thumbnails.html
date: 2023-06-04T20:46:56+02:00
type: notes
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
```