blog image is a standard size
This commit is contained in:
parent
b22631766d
commit
10c2e13c61
|
@ -7750,6 +7750,9 @@ function install_blog {
|
|||
return
|
||||
fi
|
||||
|
||||
# for the avatar changing command
|
||||
apt-get -y install imagemagick
|
||||
|
||||
if [ ! -d /var/www/$FULLBLOG_DOMAIN_NAME ]; then
|
||||
mkdir /var/www/$FULLBLOG_DOMAIN_NAME
|
||||
fi
|
||||
|
|
|
@ -120,7 +120,23 @@ function set_avatar_from_url {
|
|||
|
||||
# download the image
|
||||
cd $BASE_DIR/customimages
|
||||
wget $AVATAR -O avatar.png
|
||||
# convert to png
|
||||
wget $AVATAR -O avatar
|
||||
if [[ $AVATAR == *".gif" ]]; then
|
||||
mogrify -format png avatar
|
||||
fi
|
||||
if [[ $AVATAR == *".jpg" ]]; then
|
||||
mogrify -format png avatar
|
||||
fi
|
||||
if [[ $AVATAR == *".jpeg" ]]; then
|
||||
mogrify -format png avatar
|
||||
fi
|
||||
if [[ $AVATAR != *".png" ]]; then
|
||||
mv avatar avatar.png
|
||||
fi
|
||||
|
||||
# standard size
|
||||
mogrify -resize 150x150 avatar.png
|
||||
if [ ! -f $BASE_DIR/customimages/avatar.png ]; then
|
||||
echo $'Avatar image could not be downloaded'
|
||||
exit 3
|
||||
|
|
Loading…
Reference in New Issue