Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

low-res images in container fields... size limit??

Featured Replies

I have a container field in one of our databases which stores low-res images

At the moment there's about 200 in there but the database size is 18MB already.

In the document properties I have the 'store compatible graphics' option ticked.

We have mac and PC users, but all the images uploaded into the file are all either gif or jpg.

Do I need that option ticked? Even though I'm using in theory cross-platform graphic file formats (jpg and gif)

Any other measures I can take to reduce the file size?

What about the 'store only a reference to the file' - that will reduce file size obviously. But will both Mac and PC users still be able to view the image from within the database?

Some of these images will be served using web companion to a website - will that still work using the 'store only a reference to the file' option?

Thanks

'store only a reference to the file'

is the way to go and yes u can have them on website just place your images on the location where u will be serving it from

eg.

Z:imagesimage.jpg

were Z is the mounted drive pointing to your webserver's folder that is also shared...

so, from webserver prspective images/file will become just ordinary files

here is sample that is based on "folder import"

http://www.fmforums.com/threads/showflat.php?Cat=0&Number=109002&an=0&page=0#109002

it is not the smoothers way but it works

FM 7 seems to have a better ways of dealing with referenced files than FM 6

Good Luck!

  • Author

Thanks!

Just one question though...

When a user makes a request to the web companion the database uses the reference that it has stored to return that file.

So on the CDML format page, the CDML code you use for the image is just [FMP-Field: CONTAINER FIELD]:

Where CONTAINER FIELD is the field that stores a reference to the file??

Or does it mean you have to manually type the src to each image for every record?

Thanks

depends on your setup

no, u would store (get it through import) the "file_name.gif" in your field....

or perhaps u can make a FULL URL field

c_FULL_URL="http://mysite.com" & File_Name

<img src="[FMP-field: c_FULL_URL]"...

or depending where in the site visitor is ( Relative vs. Absolute Paths ):

<img src="/[FMP-field: File_Name]"...

All the best!

  • Author

OK, how do I get the file name of the image from the container field?

Then the folder that the images are in, I share out to the web and just use the URL and the file name?

Thanks

In CDML you use the [FMP-Image] tag to display jpegs or gifs in container fields. QuickTime movies, mpegs and other binary files are not supported through Web Companion.

The way to handle images is to type the file name into a text field, place the files in a predetermined folder (not put them into containers at all) then use calculations to build up the appropriate url to the image file. In fact the most eficient is to put the images on a different web server so WC isn't handling the calls at all.

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.