Forum Moderators: phranque

Message Too Old, No Replies

Downloading High Resolution images from Website

What is the best way for users to download high res images

         

Stephen Tiller

2:10 pm on Mar 17, 2006 (gmt 0)

10+ Year Member



Hi

I would like to know the best method for users to download High resolution images from a website. They can be jpegs, gif, tiffs, etc. but not low resolution or contained in a high res or low res PDF.

I disagree with my boss that you can link directly to a Jpeg, Gif etc. (like what he sees when you link to a PDF!) I have looked at other websites and note that some of them use the winzip technique.

As I have my own Server access I have created a directory where the images have been contained and have set this up but have not added any large images yet which could be 10Mb or more. (I already do this on another website but I do not know if this is the best or correct way).

I am unable to let users FTP into the site for security reasons, hackers, viruses etc. and I want an alternative to sending people a CD with the images on.

I look forward to your replies

Steve

txbakers

6:00 pm on Mar 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You could link directly to the file, there is nothing wrong with this.

OR you could put the files into zips and link to the zips.

Matt Probert

6:08 pm on Mar 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Jpegs rarely further reduce when ZIPed as they are already compressed.

But yes, you can directly link to a Jpeg, eg:

<a href="hi_res.jpg">Click here for hi-res picture</a>

Then the user can right-click the displayed hi-res image and "Save As...." (or equivalent depending upon their application)

You are correct, however, that a jpeg etc will not initiate a 'download' session, like a PDF or ZIP may (note may, it depends upon the client's system)

Matt

lammert

8:33 pm on Mar 17, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Normally a browser displays a jpg or gif image and doesn't download it to a user defined location. This is not because the browser is programmed to do this, but because the server gives the instruction to do this. The content type is set by the server to image/gif or similar, and this is enough information for the browser to know what to do with it.

If you want to download images instead, you have to do the following things:

Create a directory /bigpics
Put all your large images in this directory
Add a .htaccess file to this directory with the following content:

AddType application/gif .gif

Add a similar line for all your other file extensions you want to download instead of display in the browser.

When you test this, it might be that the file is loaded in your browser instead, because it recognizes the file from a previous download and doesn't look another time at the Content-type header the server sends. Clearing the cache and opening a new browser should fix this.

I have tested this with both Firefox and IE and it seems to work. Both browsers generate a popup window asking what I want to do with the image.

Stephen Tiller

9:07 am on Mar 28, 2006 (gmt 0)

10+ Year Member



Thanks for the comments

For those that suggest I can link directly to a high resolution Jpeg/gif. These images are likely to be between 10MB TO 80MB. I thought if the images were this size the image would never open due to them being so big!

I have done some tests and the directory method appears to be the best, but maybe I am biased!

Steve