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.

Can't display images in container fields

Featured Replies

For about 5 years I have been running sites with FMPro 4.1.1 and now 5.5 using CDML to search and display results. Never had any significant problems.

On one site I am now adding container fields for images. These images are to be displayed when the rest of the data in the record is shown

So far I have been unable to get the images to appear. Have used the CDML code as for displaying text [FMP-FIELD: image1] which doesn't work. Have also tried <img src="[FMP-FIELD: image1]"> also to no effect.. When I use the straight CDML (not img src) I get numeric characters displayed.

I have made several changes in getting the image(JPG) into the container field, both with and without using a reference to the file rather than the file being in the database.

The numeric characters appear to increment by 1 each time I delete and reinsert the image.

Has anyone any ideas? Am I being stupid or what

Perhaps I should add, should I be in the container field forum? but as it is a Web problem I am trying here.

Using FMPro to store and serve images is a waste of the application and not a really great idea. There are other ways to serve images which relate to a specific record. Look in the Sample Files Forum for an old thread/demo which I posted on Web Images. I forget the title, but research is good for the soul.

I agree with Keith. We have done an image storage system for a gem dealer client. Internally, we use images in containers, but on the web we store the images as files on the web server and just pass file names. Definitely the way to go.

-bd

Here is the CDML to display an image:

<img src="[FMP-Image: myimgfield]">

Good Luck.

Garry

  • Author

Thanks for the responses, guys.

Keith, I will search in the Sample Files Forum for your demo and hope it does my soul good!

Garry, thanks for the CDML as well, but although I will ry it the view seems to be that storing the image files separately is a better way.

Anyway I shall try both methods so that no-one has replied in vain!

Storing images externally is also my preferred method. I believe that it gives you greater flexibility for web-based applications.

All the best.

Garry

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.