         console.warn 'ignoring (new) type', type
 
 
-isImg = (url) -> url?.match /\.(png|jpg|gif|svg)$/i
-
-loadImages = (conv_id, cont) ->
+# these are images that are single segments that we detect as being
+# images (not attachments).
+loadInlineImages = (cont) ->
     for seg, i in cont?.segment ? []
         href = seg?.link_data?.link_target
-        if isImg(href) and !seg.link_data.img
-            seg.link_data.img = imgel = document.createElement 'img'
-            imgel.src = href
-            imgel.onload = (ev) ->
-                return unless typeof img.naturalWidth == 'number'
-                action 'imgload', conv_id
+        if isImg(href) and !seg.link_data.imgel
+            preload seg.link_data, href

        continue unless seg.text
        f = seg.formatting ? {}
        href = seg?.link_data?.link_target
        ifpass(href, ((f) -> a {href, onclick}, f)) ->
            ifpass(f.bold, b) ->
                ifpass(f.italics, i) ->
                    ifpass(f.underline, u) ->
                        ifpass(f.strikethrough, s) ->
                            pass seg.text
    null



        else if att?[0]?.embed_item?.type
            {href, thumb} = extractObjectStyle(att)
        else
            console.warn 'ignoring attachment', att unless att?.length == 0
            return
        return unless href
        preload att, href

