Images and Size

danoshea

Member
I have an image folder of boats at 611 x 455 in pixels.
Each image has the same id as the boat id column.

I want to display thumbnails in the List Display. The Joomla image subpath folder and image name is in the database image column for each boat, such as: "database-yachts/100199" (which is the column yachtid for boat number 100199). The image file is 100199.jpg

Example:

ImgPr YachtID
database-yachts/100199 100199

1. Is there an easier way than repeating the 100199?

2. Is there a way of reducing the size of the image to thumbnail size without creating a thumbnail duplicate, as an html could resize it - <img 100199 width="76" height="57">?

Thanks
 
1) Not sure what you are asking here. Maybe hide the YachtID column?

2) Are you using the image or fileupload element? A custom template would allow you to specify a smaller thumbnail or you could use \ display or calc element. Either way you would still be loading the full 611 x 455 pixels which would be more bandwidth than loading native thumbnails.

If you create a calc element you would remove your image from list view and use something like the following for your calc code.



Code:
$img = '{listname___ImgPr_raw}';
return '<img src="' . $img . '" alt="' . $img . '" width="76" height="57">';
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top