Loading...
 
Features / Usability

Features / Usability


Image Downloads

posts: 9

I am trying to create a website where people can upload images and others can view the images and download them if they wish. As far as I have determined:
1. If I use an image gallery, a user can upload an image and others can view it easily, but the image cannot be downloaded.
2. If I use a file gallery, a user can upload an image and others can download it, but viewing the image is difficult.
3. Using a {THUMB()} on a wiki page would do a great job of showing an image, and I think I can figure out how to add downloading, but THUMB only accepts id as an argument, not fileId or name, so I can't use it to display images in a file gallery.

What am I missing? Any suggestions on how I can do what I want?

posts: 838 United Kingdom
If you use an Image Gallery you can download any image by simply using the standard browser functionality by right clicking the individual image - either the thumbnail when viewing a Gallery or the full image when you browse an individual image.
posts: 9

Well, not quite true. If I right click on a thumbnail, the thumbnail image is saved. The problem with displaying an image in an image gallery is that at least some of the images will be very large; they are not automatically resized to fit the browser window.

However, your reply did get me to go back and try some more. I have determined the following:
If I place the downloadable images in a file gallery, I can create a Wiki page with the following:

Copy to clipboard
{img src=tiki-download_file.php?fileId=2&display=y width=80}

This will display the image with a width of 80 (effectively creating a thumbnail image). When I right click on it and save, the full size image is saved. This solves image size problem and allows the download, but does leave one other potential problem. Full size images are downloaded for display before being resized (to width of 80 in the example). If the page contains many large images, display time for the page is quite long with slow Internet connections.