Modify Attachments for ServiceNow portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2020 11:49 PM
Hi Everyone,
We have attachment widget on the knowledge article page as shown below. I do not want to show image attachments on that widget but still needs to display those images on knowledge article content page.I need to show only attachments other then images, from the below pic i want to hide/remove (.png) file only from this place but image should available on the knowledge article content view. Kindly please do needful to me. Thank you in advance.
- Labels:
-
Knowledge Management
-
Service Portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2020 11:56 PM
Hi there,
Are you using the out-of-the-box widget or a custom one?
If the out-of-the-box widget, I wouldn't go for cloning and editing. Just go for overriding the CSS and hiding the image. Read about it in one of my previous articles:
Changing Service Portal widgets look and feel without cloning widgets
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2021 12:28 PM
Hi Mark, Can you explain more on how to hide the images with different formats (jpg, png,...) in the OOB knowledge attachments widget? Is there a certain commend in CSS?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2020 12:17 AM
Hi Gowtham,
That is expected as the image is directly entered in HTML field. If you want to avoid that follow below steps.
1. Open the article and attach the attachment using the paper-clip icon at the top of the article page.
2. In the HTML editor (where you write the article message) click the image icon in the editor tool menu. A pop-up window will appear, choose "attachment" in the "Link Type" drop down and your attached image from the "Image URL" section.
3. Also, add the attribute align="left" to the image element otherwise your text will not wrap properly. To do this open up the HTML view ( the "<>" icon ) in the HMTL editor, and type in align="left" within the img element.
This ensures that the attachment is referred from system database & will not then show up as an additional attachment unless the Display Attachment is checked to True.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-17-2020 09:50 PM
Hi there,
Did this solve your question? Or do we need to follow-up on this?
Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.
Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP
---
LinkedIn
Community article list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field