Downsampling Image Files within FileMaker

Downsampling Image Files within FileMaker

FileMaker Pro can automatically downsample image files as they are placed into Container fields during data entry, without plugins or external image utilities.

One of the banes of container fields in hosted systems has been the tendency of users to add unoptimized images, causing file sizes to bloat dramatically. This has a negative impact on system performance at many levels:

FileMaker's recent changes with external container data and thumbnail generation are significant improvements, but they address only parts of the problem.

Reducing the size of the image before it ever becomes part of the data is key to avoiding image performance issues, but it must be done without making data-entry users jump through extra hoops such as using Photoshop or image utilities, or it simply won't happen.

It has been our experience that only those FM developers who work with images extensively have bothered to learn about the FMP12 container functions which allow image downsampling within FileMaker.

Our sample file includes several techniques for setting the optimal size of an image, and uses FileMaker's container functions to actually reduce the image size before it is stored in the record, so only the downsized image becomes part of the file's data.

download button
Downsample.zip

Sample File: Downsample.zip — 969 KB

This zipped folder includes our FileMaker example file, a sample JPEG image for testing, and a PDF with full details of the layout setup, scripting, and calculations used in the FM file, which is completely unlocked for your use.

We posted an earlier version of this demo to FM TechNet (11/20/13)

Note: image files which exceed the target sizes are downsampled, but images which are smaller than the target size are not enlarged or resized.