Hola.
revisa la informacion del manual.
http://php.net/manual/en/function.imagejpeg.php
bool imagejpeg ( resource $image
[, string $filename [, int $quality ]] )
Cita: filename
The path to save the file to. If not set or NULL, the raw image stream will be outputted directly.
To skip this argument in order to provide the quality parameter, use NULL.
solo que si le das ese parametro no te la va mostrar