Skip to content

Instantly share code, notes, and snippets.

@jpoles1
Created October 27, 2019 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jpoles1/b677fa078b8c88e6a7721edc5ed46eca to your computer and use it in GitHub Desktop.
Save jpoles1/b677fa078b8c88e6a7721edc5ed46eca to your computer and use it in GitHub Desktop.
Bash script for quickly generating a set of icons for a web app manifest.json as well as a favicon (using imagemagick)
#!/bin/bash
# Requires imagemagick be installed (sudo apt install imagemagick on ubuntu)
convert public/img/icon.png -resize 512x512 public/img/icons/android-chrome-512x512.png
convert public/img/icon.png -resize 192x192 public/img/icons/android-chrome-192x192.png
convert public/img/icon.png -resize 16x16 public/img/icons/16.png
convert public/img/icon.png -resize 32x32 public/img/icons/32.png
convert public/img/icon.png -resize 48x48 public/img/icons/48.png
convert public/img/icons/16.png public/img/icons/32.png public/img/icons/48.png public/favicon.ico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment