--- text_moin_wiki_old.py	2007-02-18 17:00:12.000000000 +0100
+++ text_moin_wiki.py	2007-02-18 21:05:12.000000000 +0100
@@ -209,12 +209,27 @@
         if scheme == 'drawing':
             return self.formatter.attachment_drawing(fname, text)
 
-        # check for image, and possibly return IMG tag (images are always inlined)
-        if not kw.get('pretty_url', 0) and wikiutil.isPicture(fname):
-            return self.formatter.attachment_image(fname)
+        # check if AccessibleMoin is wanted. In AccessibleMoin we don't want to confuse
+        # attachment of images with inline of images anymore. It's like IE confusing alt
+        # with title.
+        accessible_moin = False
+        if hasattr(self.request.cfg, 'accessible_moin'):
+            accessible_moin = self.request.cfg.accessible_moin
+        if not accessible_moin:
+            # check for image, and possibly return IMG tag (images are always inlined)
+            if not kw.get('pretty_url', 0) and wikiutil.isPicture(fname):
+                return self.formatter.attachment_image(fname)
 
         # inline the attachment
         if scheme == 'inline':
+            # in AccessibleMoin pictures are inlined as other stuff is inlined. For proper
+            # picture display use ImageLink or Image macro
+            if accessible_moin:
+                if not kw.get('pretty_url', 0) and wikiutil.isPicture(fname):
+                    return (self.formatter.preformatted(1) +
+                            self.formatter.attachment_image(fname) +
+                            self.formatter.preformatted(0) +
+                            self.formatter.attachment_link(fname, text))
             return self.formatter.attachment_inlined(fname, text)
 
         return self.formatter.attachment_link(fname, text)
