The above seems to work in my testing, however it allows the plain thumbnail size in the preview to grow to large. So the full fix will be
$format = setDefaultFormat($filename);
if ($resize && resizeImageFile($filename, $filename . '_thumb', 100, 100, $format))
$max_width = $this->_req->is_set('thumb') && !empty($modSettings['attachmentThumbWidth']) ? $modSettings['attachmentThumbWidth'] : 250;
$max_height = $this->_req->is_set('thumb') && !empty($modSettings['attachmentThumbHeight']) ? $modSettings['attachmentThumbHeight'] : 250;
$format = setDefaultFormat($filename);
if ($resize && resizeImageFile($filename, $filename . '_thumb', $max_width, $max_height, $format, false, false))