3248 posts Nice Guy
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
+6 more
RubenBristian says

So i have an image object in the php file. How can i make that box appear and let the users save the image in their computer?

I am currently using imagejpeg($img, ””, 100);, which shows the picture and the the user can save it. But i want open that save box auto .. can it be done?

1389 posts
  • Beta Tester
  • Bought between 10 and 49 items
  • Exclusive Author
  • Grew a moustache for the Envato Movember competition
  • Has been a member for 5-6 years
  • Microlancer Beta Tester
  • Referred between 10 and 49 users
+3 more
Pdesignx says

header("Content-Type: image/jpg");
header("Expires: 0");
header("Cache-Control: must-revalidate, post-check=0, pre-check=0");
header("content-disposition: attachment; filename=my_image.jpg");

imagejpeg($img, null, 100);

3248 posts Nice Guy
  • Forum Superstar
  • Most Wanted Bounty Winner
  • Elite Author
  • Sold between 250 000 and 1 000 000 dollars
  • Has been a member for 6-7 years
  • Repeatedly Helped protect Envato Marketplaces against copyright violations
  • Won a Competition
  • Bought between 100 and 499 items
  • Exclusive Author
+6 more
RubenBristian says

thanks! :)

by
by
by
by
by
by