title: Create jpg using imagejpeg and saving it without showing it on the page
body: <p>Right now I am using a php script (let's say the save-page) to create a jpeg and save it to the server. Although it all works, when opening the save-page, the jpeg is also shown, which I don't really want. I just want the jpeg to be created and saved to the desired destination. To be clear, the saving is already working. The is part of the script that I am using. </p>
  
  <pre><code>header('Content-type: image/jpeg');
  $jpg_image = imagecreatefromjpeg('*link to the base image*');
  
  $white = imagecolorallocate($jpg_image, 0, 0, 0);
  $font_path = 'interstate.ttf';
  
  imagettftext($jpg_image, 14, 0, 44, 41, $white, $font_path, $text);
  imagejpeg($jpg_image);
  
  // save jpg to widget folder
  imagejpeg($jpg_image, 'widget/vehicle_1_' . $id . '.jpg');
  
  //free up memory
  imagedestroy($jpg_image);
  </code></pre>
  
  <p>How can I change the script so that it saves the jpg to the widget folder, but not show it on this page when activated? Thanks in advance!</p>