File size: 648 Bytes
f6ba329
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

# Check if ImageMagick is installed
if ! command -v convert &> /dev/null; then
    echo "Error: ImageMagick is not installed. Please install it first."
    echo "On Ubuntu/Debian: sudo apt-get install imagemagick"
    echo "On macOS with Homebrew: brew install imagemagick"
    exit 1
fi

# Convert WebP to JPG
echo "Converting banner.webp to banner-fb.jpg..."
convert banner.webp -quality 95 banner-fb.jpg

# Verify the file was created
if [ -f "banner-fb.jpg" ]; then
    echo "Conversion successful! banner-fb.jpg created."
    echo "File size:"
    du -h banner-fb.jpg
else
    echo "Conversion failed."
    exit 1
fi

echo "Done!"