Image having multiple thumbnails of different sizes
2 posts by 2 authors in: Forums > CMS Builder
Last Post: September 8, 2011 (RSS)
Hi guys,
Is there a way I can allow one image upload to have multiple thumbnails so that I can use one thumbnail of size 'x' on the List page and one thumbnail of size 'y' on the detail page with the full sized image?
Basically I want the end user to only have to upload an image once and it then appear in three different places at the necessary size.
Thanks in advance!
Hannah
Is there a way I can allow one image upload to have multiple thumbnails so that I can use one thumbnail of size 'x' on the List page and one thumbnail of size 'y' on the detail page with the full sized image?
Basically I want the end user to only have to upload an image once and it then appear in three different places at the necessary size.
Thanks in advance!
Hannah
Re: [Kittybiccy] Image having multiple thumbnails of different sizes
By Jason - September 8, 2011
Hi Hannah,
Yes, in CMS Builder you can have up to 4 different thumbnails for an uploaded image.
If you go into your section editor and click "modify" on your upload field, under the "Input Validation" section, you'll see 4 checkboxes to "Create Thumbnail". Check the boxes for the number of thumbnails you want to create and input the height and width you want for each one. If you already have images uploaded to that field you can click the "recreate" link to create those thumbnails.
Finally, when you are outputting your images you can use the thumbnail number to get the different sizes. For example, the first thumbnail would look like this:
The second thumbnail would look like this:
and so on up to 4.
Hope this helps get you started.
Yes, in CMS Builder you can have up to 4 different thumbnails for an uploaded image.
If you go into your section editor and click "modify" on your upload field, under the "Input Validation" section, you'll see 4 checkboxes to "Create Thumbnail". Check the boxes for the number of thumbnails you want to create and input the height and width you want for each one. If you already have images uploaded to that field you can click the "recreate" link to create those thumbnails.
Finally, when you are outputting your images you can use the thumbnail number to get the different sizes. For example, the first thumbnail would look like this:
<img src = "<?php echo $image['thumbUrlPath']" height = "<?php echo $image['thumbHeight'];?>" width = "<?php echo $image['thumbWidth'];?>" />
The second thumbnail would look like this:
<img src = "<?php echo $image['thumbUrlPath2']" height = "<?php echo $image['thumbHeight2'];?>" width = "<?php echo $image['thumbWidth2'];?>" />
and so on up to 4.
Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/