Thank you for sharing this.
By default ImageMagick preserves EXIF/IPTC info (apparently)
Your solution will remove EXIF/IPTC on thumbnails and resized images, this solution might not be desired if EXIF is important
To remove EXIF/IPTC only from thumbnails use this instead:
$command = $convert_options['convert_path'].(strstr($dest, THUMB_PATH) ? " -strip" : "")." -quality ".$quality." -antialias -geometry $width"."x"."$height \"$src\" \"$dest\"";