diff --git a/portal-web/docroot/html/portlet/wiki/edit/editor_config.jspf b/portal-web/docroot/html/portlet/wiki/edit/editor_config.jspf
index 75bbc4fbe76e7308cbf31913ce8d6204d32b372e..82cfecb554afcff8aaa6689a1abab0bb4894c4d9 100644
--- a/portal-web/docroot/html/portlet/wiki/edit/editor_config.jspf
+++ b/portal-web/docroot/html/portlet/wiki/edit/editor_config.jspf
@@ -22,7 +22,11 @@ String attachmentURLPrefix = StringPool.BLANK;
 if (wikiPage != null) {
 	resourcePrimKey = wikiPage.getResourcePrimKey();
 
-	attachmentURLPrefix = themeDisplay.getPortalURL() + themeDisplay.getPathMain() + "/wiki/get_page_attachment?p_l_id=" + themeDisplay.getPlid() + "&nodeId=" + wikiPage.getNodeId() + "&title=" + HttpUtil.encodeURL(wikiPage.getTitle()) + "&fileName=";
+	attachmentURLPrefix = themeDisplay.getPathMain() + "/wiki/get_page_attachment?p_l_id=" + themeDisplay.getPlid() + "&nodeId=" + wikiPage.getNodeId() + "&title=" + HttpUtil.encodeURL(wikiPage.getTitle()) + "&fileName=";
+
+	if (!format.equals("html")) {
+		attachmentURLPrefix = themeDisplay.getPortalURL() + attachmentURLPrefix;
+	}
 }
 
 Map<String,String> configParams = new HashMap();
@@ -32,14 +36,18 @@ configParams.put("wikiPageResourcePrimKey", String.valueOf(resourcePrimKey));
 
 Map<String,String> fileBrowserParams = new HashMap();
 
-fileBrowserParams.put("attachmentURLPrefix", attachmentURLPrefix);
-
 if (format.equals("html")) {
-	fileBrowserParams.put("Types", "Document,Page,Attachment");
+	if (resourcePrimKey == 0) {
+		fileBrowserParams.put("ImageTypes", "Image");
+		fileBrowserParams.put("URLTypes", "Document,Page");
+	}
+	else {
+		fileBrowserParams.put("ImageTypes", "Image,AttachmentImage");
+		fileBrowserParams.put("URLTypes", "Document,Page,Attachment");
+	}
 }
 else {
-	fileBrowserParams.put("Type", "Attachment");
+	fileBrowserParams.put("ImageTypes", "AttachmentImage");
+	fileBrowserParams.put("URLType", "Attachment");
 }
-
-fileBrowserParams.put("wikiPageResourcePrimKey", String.valueOf(resourcePrimKey));
 %>
\ No newline at end of file
