Reputation: 5489
I am using a php file which also loads an image. I am using header("location url") to load the image.
My problem is that the image is loading very slowly. If I load it normally, it is much faster.
If I use JavaScript and put the code in the header to load the image, the image loads fast, but then I can't display the picture as an image.
Is there a way to speed the loading time up?
Thanks !
Upvotes: 0
Views: 509
Reputation: 19380
Try like this...
header("Content-Type: image/jpeg");
readfile("image.jpg");
Upvotes: 1