Need to add thumbnail images along with the original images

Permalink 1 user found helpful
Hi everybody,

I need to add a thumbnail images along with the original images and respective descriptions in asmiller gallery add-on, so i have used the below given code
<?php 
$ah = Loader::helper("concrete/asset_library");
 echo $ah->image('thumb_image', 'thumb_image', t('Choose thumb'),$bf);
?>


but i am not able to add more than one image because it conflicts with each other.
I think the image field name = thumb_image should be an array. I unsure how to do this. If any has come across this problem before any help would be appriciated. I have attached a screen shot and you can easily understand my requirement by seeing it.

Thank you

1 Attachment

SVijay
 
olliephillips replied on at Permalink Reply
olliephillips
If I understand you you correctly, you could do it like this, when trying to upload multiple images
## Image 1
$img1 = Loader::helper('concrete/asset_library');
echo $img1->file('image1id', 'image1ID', t('Choose Image 1'), $img1Selected);
$img1Selected = File::getByID($image1ID);
## Image 2
$img2 = Loader::helper('concrete/asset_library');
echo $img2->file('image2id', 'image2ID', t('Choose Image 2'), $img2Selected);
$img2Selected = File::getByID($image2ID);


But if all you need is a different sizes of the same image then you would probably just upload the one image and instead create the size you need at run time, using code similar to the below.

$imageHeight=200;
$imageWidth=200;
$ih = Loader::helper('image');
$f = File::getByID($imageID);
$myimage =  $ih->getThumbnail($f, $imageWidth, $imageHeight);
SVijay replied on at Permalink Reply
SVijay
Thank you for your response.