3802 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Had an item that was trending
  • Has been part of the Envato Community for over 7 years
+12 more
KrownThemes
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
  • Has been part of the Envato Community for over 7 years
  • Has referred 10+ members
  • Has sold $10,000+ on Envato Market
  • Has been a beta tester for an Envato feature
+9 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);

3802 posts
  • Elite Author: Sold more than $75,000 on Envato Market
  • Has sold $750,000+ on Envato Market
  • Had an item that was trending
  • Has been part of the Envato Community for over 7 years
+12 more
KrownThemes
says

thanks! :)

by
by
by
by
by
by