Forum Moderators: phranque
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
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
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.
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