ColdFusion Muse

Farcry Masking in the Image Picker

Other Farcry developers probably already know this, but it was news to me. A customer was frustrated the "image picker" widget that comes with Farcry and may be accessed from the "body" of an HTML page. You can browse to images in your library and place them into the HTML content of a page. The problem was that it would place the thumbnail of the image on the page with a link to the "full size" image. Most of the time she wanted to simply place the full size image on the page as a part of the content - so she would have to manually edit the image properties to make it work.

What I discovered was a setting in the images config file (go to "admin-Config files-Image") called INSERTHTML. The default value of insertHTML is:

<a href='*imagefile*' target='_blank'><img src='*thumbnail*' border=0 alt='*alt*'></a>
This snippet functions as a mask for inserting objects from the image picker. If you look closely you will see that it is set up to mimic the behavior I describe above - inserting a thumbnail with a link to the full size image. To alter the behavior of the image picker I changed the mask to this:
<img src='*imagefile*' border=0 alt='*alt*'>
That worked quite well. One thing that still annoys me about the image type is the the width and height sometimes are inserted and sometimes they are left out of an image added to the library. I've never been able to identify the conditions that make the width and height a part of the properties when uploading.

dc's Gravatar Yeah I found that quite annoying too... then found insertHTML templates! That lets you provide different types of inserts for images and files.
# Posted By dc | 11/18/06 2:28 PM

Blog provided and hosted by CF Webtools. Blog Sofware by Ray Camden.