Another solution is to ‘touch’ the file before calling imagejpeg. Edit flexible-upload.php like so:
$jpegquality = get_option(FUP_JPEG_QUALITY_OPTION);
$jpegquality = $jpegquality ? $jpegquality : 75;
touch($thumbpath); // add this line
if (!imagejpeg( $thumbnail, $thumbpath, $jpegquality )) {
$error = __( "Thumbnail path invalid", 'fup' );
}
Add a similiar line before other imagejpeg, imagegif, and imagepng calls.