The reason the img dissapears is because the character that it is linked to leaves the viewport, so the engine stops rendering it.
The same happens with groups, for the same reason.
If you want to get around this problem, you can us a cheater method.
Use a separate scroll bar, mask off your viewing area with other controls. (already done in the case of your stack)
set the height of your field to the formattedheight of your field so that all contents are rendered and visible.
set the endvalue of scrollbar "myscrollbar" to the height of field "showchat" - (however tall the viewport is)
then, since you have the field positioned at the top of the card, its easy, just set the top of the field to -(the thumbposition of scrollbar "myscrollbar")
You want a negative value because you're actually moving the top of the field off screen.
I just did a very quick proof of concept. There are still issues to be worked around. I have 1 button set (the one that inserts the graphic) so that it will resize the field. Haven't done that with the other.
You'll want to always size the field when changing the contents.
If the formattedheight of the field is less than or = to the height of your viewport you'll want to leave the field sized at viewport height and disable the scrollbar (otherwise weird things happen)
You'll want to make sure you update the scrollbarend every time the contents change also.
Here is a link to your stack, adjusted, but with the other minor issues ignored. If you need help getting it to function better let me know.
https://dl.dropboxusercontent.com/u/119 ... 1.livecode
The code isn't clean, but it works. It'll still show the "quirks" I mentioned above, and if you don't fill the field enough and move the scrollbar, you can lose the thumb. As long as you keep it updated based on field updates, and only show it when theres enough text in the field, it works dandy.
The next concern i'd worry about (if it were me) would be limiting the length of the field. You'll probably want a way to drop the oldest messages off the end with a "load more messages.." option of some type.