- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2014 05:16 AM
Hi,
What would you suggest to store the images used in HTML content of KB articles? Image Library or attachment?
If we store the images in the library, we have 2 drawbacks:
- the library will grow and it may be difficult to find a specific image in it
- if an article is visible only for a certain role, we won't apply the same security on the image... This may cause security leaks
If we store images as attachments to the article, we have 1 drawback:
- For the end-user who reads the article, it is not user-friendly to have the HTML content (with embedded images -> this is perfect) and in addition the attachments. The end-user may think that attachments are additional content and he will probably loose time to open them...
Did you have the same concern? What solution did you choose?
Thanks!
Solved! Go to Solution.
- Labels:
-
Knowledge Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2014 01:25 AM
Thank you.
For information, there is a bug in BERLIN with the TinyMCE HTML editor :
1. you add an image as attachment in a KB article.
2. you click on "insert image" from the TinyMCE HTML editor in this KB article.
3. select "attachement"
=> the image you had just attached is not available in the list !
Hopefully this bug is fixed with Dublin;
So we workaround by using a URL as you suggested by waiting for Dublin. (right click on the attachement, copy the link, and then use a URL to embed the image within HTML code)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2014 03:03 AM
After more investigations, it is better to use images as attachments and do not display them to the end-users. (end-users will see only HTML text with embedded images, which is perfect)
But we have a bug (running on Berlin) : attached images are not available to be included in the HTML ! Does anyone know a workaround?
Here is the scenario:
1. Add an image as attachment (by using the paperclip on the top right corner)
2. In the 'text' field (HTML editor), click on the "Insert Image" toolbar button
3. Select "attachment" in the dropdown list (instead of "Image library" that is selected by default)
4. Result : The image that you've just attached is NOT available...
😞
Any help is appreciated

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2014 08:25 AM
All attachments are in the sys_attachment table. So you have two options, look there for each one and get its sys_id or in the knowledge record all the attachments at the top you can right click on the link to view them and select properties and then copy the link to the attachment and use that in the HTML for the article. Second option is easier and assumes you are using IE.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-13-2014 01:25 AM
Thank you.
For information, there is a bug in BERLIN with the TinyMCE HTML editor :
1. you add an image as attachment in a KB article.
2. you click on "insert image" from the TinyMCE HTML editor in this KB article.
3. select "attachement"
=> the image you had just attached is not available in the list !
Hopefully this bug is fixed with Dublin;
So we workaround by using a URL as you suggested by waiting for Dublin. (right click on the attachement, copy the link, and then use a URL to embed the image within HTML code)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-15-2016 04:46 AM
Hi!
I too had the same requirement and what I did is, I have executed below background script to get sys_id(s) of embedded images and attachment tables with those sys_id(s). Hope someone may find this helpful.
//BACKGROUND-SCRIPT TO GET EMBEDDED IMAGES SYS_ID(s)
var gr=new GlideRecord('kb_knowledge');
gr.addEncodedQuery('workflow_state=published^u_assignment_group=a0b22354a5deca9501f440e71523e8d2');//filter - optional
gr.query();
while(gr.next()){
var sTextData=gr.text.toString();
var sAttachments=sTextData.split('sys_attachment.do?sys_id=');
var sAttachmentSYS='';
for(var i=0;i<sAttachments.length;i++){
sAttachmentSYS=sAttachments[i].substring(0,sAttachments[i].indexOf('\"'))
//checking in sys_attachment table
var grAtt=new GlideRecord('sys_attachment');
grAtt.addQuery('sys_id',sAttachmentSYS);
grAtt.addEncodedQuery('table_sys_id!='+gr.sys_id);
grAtt.query();
while(grAtt.next()){
gs.print(',\''+grAtt.sys_id+'\''); //sys_id(s) of sys_attachment table
}
}//for
}//while