Forum for discussing general topics related to Couch.
3 posts Page 1 of 1
Hi,

My website http://www.fouridine.com/work.php?f=9 contains 2 image sizes. I would like to add a 3rd image size so that my light box (fancybox), available in thumbnail mode, uses a higher res image. I have video embeds too but do not want the size to change in lightbox. Not sure where to change these settings?

Also, noticed when i upload an image, the quality seems poorer than my original image?

I haven't touched Couch cms since 2011 so I am quite perplexed. I looked at my work.php file and i think its this part? Do I have to change anything in the jquery code for fancybox?

<cms:template title='Work' clonable='1'>
<cms:editable name='work_content' type='richtext'/>

<cms:editable
name='video'
type='textarea'
group='group_gallery'
no_xss_check='1' />

<cms:editable
name="thumb_video"
label="Video Thumbnail"
desc="Video Thumbnail of image above"
width='195'
height='90'
group='group_gallery'
type="image" />

<cms:editable name='group_gallery' label='Gallery' type='group'/>

<cms:repeat count='6' startcount='1' >
<cms:editable
name="gallery_img_<cms:show k_count />"
label="Image <cms:show k_count />"
width="500"
height="500"
show_preview='1'
preview_height='200'
group='group_gallery'
type="image" />

<cms:editable
name="thumb_gallery_img_<cms:show k_count />"
assoc_field="gallery_img_<cms:show k_count />"
label="Thumbnail <cms:show k_count />"
desc="Thumbnail of image above"
width='90'
height='90'
group='group_gallery'
type="thumbnail" />
<cms:editable
name="thumb_gallery2_img_<cms:show k_count />"
assoc_field="gallery_img_<cms:show k_count />"
label="Thumbnail2 <cms:show k_count />"
desc="Thumbnail2 of image above"
width='195'
height='90'
group='group_gallery'
type="thumbnail" />
Hi Fourdine,

Good to see after so many years :)

Replying to your query -
I see that we are using very old technique for having variable number of images in a post (not surprising as that code is at least 4 years old). Now Couch has several advanced techniques of doing this.

But anyway, coming to the point that you mentioned -
I would like to add a 3rd image size so that my light box (fancybox), available in thumbnail mode, uses a higher res image.
In your code, we have a main image '500x500' and two thumbnails attached to it. I assume 500x500 is not good enough now for showing in the lightbox.

Now we have two options -
1. Change the definition of the main image to make it 2000x2000 or
2. Define an additional 'image' region like this -
Code: Select all
<cms:editable
    name="gallery_hires_img_<cms:show k_count />"
    label="Image High Resolution <cms:show k_count />"
    width="2000"
    height="2000"
    quality='100'
    show_preview='1'
    preview_height='200'
    group='group_gallery'
    type="image"
/>

Setting the 'quality' parameter to '100' (as in the definition above) should rectify the quality loss you observed.

I think you should go with the first option.
The only change in the HTML markup would be on the list page where the image shown would now get bigger - setting explicit HTML 'width' or 'height' should make that manageable.

What do you say?
Thanks KK,

On holiday now tried doing this. Right now changing the size up changes the size in my list view but not in my light box it seems? http://www.fouridine.com/work.php?f=9 See example for "harassment" and thumbnail view for lightbox "http://www.fouridine.com/work.php?f=9&thumb=1"
3 posts Page 1 of 1
cron