I have a problem using image download with the PHP header function: The image is downloading properly, can be viewed in Photoshop, but cannot be opened in Windows Photo Viewer and MacOS Preview. Here ist the (simple) code I am using:
header('Content-type: image/jpg');
header('Content-Disposition: attachment; filename="'.$url.'"');
readfile($image);
Thank you so much,
Alex