Skip to content

Instantly share code, notes, and snippets.

@vlazic
Created April 22, 2020 10:52
Show Gist options
  • Save vlazic/cf7843044b7d1caf84afd4ad7b1f3d77 to your computer and use it in GitHub Desktop.
Save vlazic/cf7843044b7d1caf84afd4ad7b1f3d77 to your computer and use it in GitHub Desktop.
Avada Favicon generator
#!/bin/bash
# this script requires ImageMagick suite to be installed
sizes=(32 57 72 114 144)
identify $1 >/dev/null || {
echo "First parameter shoud be your favicon file"
exit 0
}
filename="${1%.*}"
for size in "${sizes[@]}"; do
convert -resize "${size}x" -background transparent "$1" "${filename}-${size}.png"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment