Dynamic Image Thumbnails

What's the easiest way to display images within your FileMaker solution?

Did you answer with a container field? Sure!

Now, did you answer with the "same" container field which stores the image?

Maybe not.

In fact, probably not. The right answer, however, in most all situations is typically "it depends", but we're going to walk through the knowledge necessary to optimize your database for the best performance when it comes to image display.

You often find tradeoffs when it comes to storing and displaying data. You either store once and render in multiple sizes or you store multiple sizes and render once.

The key is knowing what's going on behind the scenes. Knowing what's being transferred and when and how FileMaker provides support for this in order to make your database as efficient as possible!

AttachmentSize
DynamicThumbnails.zip49.9 KB

Comments

Thanks for the great video.And it makes me wonder, when I add an image in list view to bigImage,and remove the "IF" statement, why don't the thumbnails generate automatically? The calculation seems like it should evaluate when the image is inserted. Thanks.

The usefulness of the way the calculation evaluates is such that it derives the image resizing information it needs from the fields themselves.

This requires the fields to be present on the layout where the image is to be resized. Because of this, you gain the level of control needed.

You "could" do something like use a tab panel or even hang just one pixel of the resizing containers off the edge of the layout.

However, your goal with most coding aspects of your solution is to have canonical locations where things only have to be changed once. This being the case, I would personally use a utility layout and I would use Script Triggers to either navigate to the target layout - or better yet, to preserve state, create a new window offscreen which goes to the utility layout. Simply reseting the large container field to itself will trigger the resizing - provided the resizing containers are on the layout. :)

This, of course, can be executed based on any number of conditions, such as if the copy of FileMaker client is desktop vs. go.

If using Server, you can also run a periodic server side script to find un-resized images or you can go the route of a client initiated server side script. The former is easier the later will require a bit more work.

Matt

-- Matt Petrowsky - ISO FileMaker Magazine Editor