# Download image

**URL:** <https://forum.kirupa.com/t/download-image/34880>\
**Category:** Uncategorized\
**Created:** [November 7, 2003, 2:29pm UTC](https://forum.kirupa.com/t/download-image/34880 "2003-11-07T14:29:10Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![Drunken](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@Drunken](https://forum.kirupa.com/u/Drunken)\
**Post date:** [November 7, 2003, 2:29pm UTC](https://forum.kirupa.com/t/download-image/34880/1 "2003-11-07T14:29:10Z")

</div>

Heya,

I want to put a link, like Download Image, for then user can download the image… but with this, the browser is open with that image…

Exist any function or something like that in php or javascript to make download and not open the browser ??

thks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 7, 2003, 3:33pm UTC](https://forum.kirupa.com/t/download-image/34880/2 "2003-11-07T15:33:02Z")

</div>

Have you considered putting the image in a zip archive and then letting the browser handle that download as normal with an URL going to the zip?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 7, 2003, 4:07pm UTC](https://forum.kirupa.com/t/download-image/34880/3 "2003-11-07T16:07:52Z")

</div>

In this case not, because the images to download are uploaded by other users… and format are jpg,gif,png , etc…

thks by the way

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 7, 2003, 4:13pm UTC](https://forum.kirupa.com/t/download-image/34880/4 "2003-11-07T16:13:16Z")

</div>

> \*Originally posted by Drunken \*  
> \*\*Heya,

I want to put a link, like Download Image, for then user can download the image… but with this, the browser is open with that image…

Exist any function or something like that in php or javascript to make download and not open the browser ??

thks \*\*

not that i know of, unless you do it in flash

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 7, 2003, 4:15pm UTC](https://forum.kirupa.com/t/download-image/34880/5 "2003-11-07T16:15:07Z")

</div>

hmmm ok.

Thks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 7, 2003, 4:17pm UTC](https://forum.kirupa.com/t/download-image/34880/6 "2003-11-07T16:17:38Z")

</div>

Maybe you’ll just have to fall back on an instruction to right-click and ‘Save picture as…’

Hey, if it’s good enough for Adobe Studio … ! 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 7, 2003, 4:19pm UTC](https://forum.kirupa.com/t/download-image/34880/7 "2003-11-07T16:19:16Z")

</div>

Yah… it could be a good alternative… thks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 7, 2003, 4:19pm UTC](https://forum.kirupa.com/t/download-image/34880/8 "2003-11-07T16:19:38Z")

</div>

> \*Originally posted by Cello \*  
> \*\*Maybe you’ll just have to fall back on an instruction to right-click and ‘Save picture as…’

Hey, if it’s good enough for Adobe Studio … ! 🙂 \*\*

lol word, if adobe can do so can you!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 7, 2003, 4:21pm UTC](https://forum.kirupa.com/t/download-image/34880/9 "2003-11-07T16:21:09Z")

</div>

😛

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 7, 2003, 4:23pm UTC](https://forum.kirupa.com/t/download-image/34880/10 "2003-11-07T16:23:50Z")

</div>

Love it 😛

Good one, D!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 7, 2003, 6:48pm UTC](https://forum.kirupa.com/t/download-image/34880/11 "2003-11-07T18:48:44Z")

</div>

actually, there is a way…

[http://www.tek-tips.com/gpviewthread.cfm/qid/565555/pid/434/lev2/4/lev3/31](http://www.tek-tips.com/gpviewthread.cfm/qid/565555/pid/434/lev2/4/lev3/31)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 8, 2003, 8:26am UTC](https://forum.kirupa.com/t/download-image/34880/12 "2003-11-08T08:26:01Z")

</div>

> \*Originally posted by njs12345 \*  
> \*\*actually, there is a way…

[http://www.tek-tips.com/gpviewthread.cfm/qid/565555/pid/434/lev2/4/lev3/31](http://www.tek-tips.com/gpviewthread.cfm/qid/565555/pid/434/lev2/4/lev3/31) \*\*

nice link

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 8, 2003, 6:22pm UTC](https://forum.kirupa.com/t/download-image/34880/13 "2003-11-08T18:22:27Z")

</div>

Here is all you need 😉

(search button…)

[http://www.kirupaforum.com/forums/showthread.php?threadid=32495](http://www.kirupaforum.com/forums/showthread.php?threadid=32495)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [November 13, 2003, 2:50am UTC](https://forum.kirupa.com/t/download-image/34880/14 "2003-11-13T02:50:45Z")

</div>

This is the best way to do it hands down. It works for any type of file but you would want to apply it only to a certain directory or all your images would open as save as rather the embeded in html.

```php
AddType application/octet-stream .jpg

```

You can change the ending to anything you want. I use it for MP3, so people are forced to download the file, rather then stream it from something like winamp.

Add that you a .htaccess file inside a specific directory. Ex) [www.yourdomain.com/download/images/](http://www.yourdomain.com/download/images/). You must be using Apache.
