Late to reply to this but thought it may serve as useful for anyone hitting on this as I did from Google.
A quick and easy way to force the browser to allow you to save as a particular filename and/or extension is to pass the filename and extension into the URL (or form action depending on how you are generating the image)
Now, right-clicking on the image and choosing "Save as" (or equivalent, depending on which browser you are using) will save the file as a jpeg defaulting to the name thepic.jpg
We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.
GD help when saving file
in PHP Coding Help
Posted
Late to reply to this but thought it may serve as useful for anyone hitting on this as I did from Google.
A quick and easy way to force the browser to allow you to save as a particular filename and/or extension is to pass the filename and extension into the URL (or form action depending on how you are generating the image)
eg as a form post
or as just a URL (in the querystring)
Now, right-clicking on the image and choosing "Save as" (or equivalent, depending on which browser you are using) will save the file as a jpeg defaulting to the name thepic.jpg
Works for all browsers (as far as I know)