case $attpath in
*.[jJ][pP][gG]|*.[jJ][pP][eE][gG]|*.[pP][nN][gG])
- read junk junk res junk <<-EOF
- $(identify -- "$attpath")
- EOF
+ res="$(identify -- "$attpath")"
+ res="${res% * * * * * *}" res="${res##* }"
if [ "${res%x*}" -gt 2048 ]; then
convert "$attpath" -resize 1920x-2 -quality 85 "$cachepath"
else