- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Monday
Is there any way to hide a PNG from the attachments list of a knowledge article? For example, we have a policy that is a PDF that we have attached to a knowledge article. We also put an image in the article, and now we can see both on the right side of the knowledge article. I see in the article itself, there's a display attachments checkbox, but if I remove that, I lose the PDF as well.
Any suggestions? It's a policy, so I don't really want to convert it from a PDF to a PNG to avoid.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday - last edited Tuesday
Hi, you can customize the widget and Angular provider where the attachments are displayed and hide all png files using an ng-if condition.
Here is how you can do it:
- Duplicate the Angular Provider "spAttachmentManager" with a new name like "spAttachmentManagerNoPng", direct link: /sp_angular_provider.do?sys_id=06e836f0d722120023c84f80de6103a1
- Add this in line 7: ng-if="!attachment.file_name.endsWith(\'.png\')"
- Clone the widget "Knowledge Attachments" (kb-attachments), direct link: /sp_config?id=widget_editor&sys_id=405cf5910ba832004ce28ffe15673aff
- In line 2 of the cloned widget, replace the html tag "sp-attachment-manager" with "sp-attachment-manager-no-png"
- In your cloned widget, add the duplicated provider in the Related List:
- In Page Designer, open your KB Article page (for example "kb_article_view") and replace the "Knowledge Attachments" widget with your new "Knowledge Attachments Custom" widget
- Reload the page in Service Portal, you are done! (I kept both widgets here for illustration purposes)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Tuesday - last edited Tuesday
Hi, you can customize the widget and Angular provider where the attachments are displayed and hide all png files using an ng-if condition.
Here is how you can do it:
- Duplicate the Angular Provider "spAttachmentManager" with a new name like "spAttachmentManagerNoPng", direct link: /sp_angular_provider.do?sys_id=06e836f0d722120023c84f80de6103a1
- Add this in line 7: ng-if="!attachment.file_name.endsWith(\'.png\')"
- Clone the widget "Knowledge Attachments" (kb-attachments), direct link: /sp_config?id=widget_editor&sys_id=405cf5910ba832004ce28ffe15673aff
- In line 2 of the cloned widget, replace the html tag "sp-attachment-manager" with "sp-attachment-manager-no-png"
- In your cloned widget, add the duplicated provider in the Related List:
- In Page Designer, open your KB Article page (for example "kb_article_view") and replace the "Knowledge Attachments" widget with your new "Knowledge Attachments Custom" widget
- Reload the page in Service Portal, you are done! (I kept both widgets here for illustration purposes)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
Thank you so much! This worked great!