Insert and resize images in Knowledge Docs
search cancel

Insert and resize images in Knowledge Docs

book

Article ID: 216060

calendar_today

Updated On:

Products

CA Service Management - Service Desk Manager CA Service Desk Manager

Issue/Introduction

This article discusses how to insert and resize a given image in the Service Desk Knowledge Docs

Environment

Release : 17.3

Component : SERVICE DESK MANAGER

Resolution

When inserting images in a Knowledge doc, what happens is that the image files themselves are accessed as Attachments in the backend SDM install.  If one chooses to invoke the  "Edit Resolution" button on a Knowledge Doc, there would be a menu item for "Insert -> Image" which allows the functionality to select an image file to upload to the Attachments.  The "Insert -> Image from Library" menu option will allow the selection of an existing image that was already uploaded to the SDM Attachments.

For resizing an image, consider the following code that is generated if one views the HTML source code of a given Knowledge Doc that has an image attached:

<img src="http://SDM-SERVER:8080/CAisd/UploadServlet?ServerName=SDM-SERVER&amp;RepId=doc_rep:1000&amp;AttmntId=400104&amp;SecId=E42761128E82794C8D9E07280871AD7D&amp;Bpsid=0" alt="" vspace="0" hspace="0" border="0" align="bottom">

By itself, this will render the attachment image just as it was uploaded, which could be a problem if the uploaded file is of significant size.  One could resize this by adding the "height" or "width" parameter and express a percentage to reduce the size display.  Naming just "height" or "width" parameter in this way will reduce the size while preserving the corresponding proportion.

This is an example where the size of the image height was reduced by 50%

<img src="http://SDM-SERVER:8080/CAisd/UploadServlet?ServerName=SDM-SERVER&amp;RepId=doc_rep:1000&amp;AttmntId=400104&amp;SecId=E42761128E82794C8D9E07280871AD7D&amp;Bpsid=0" alt="" vspace="0" hspace="0" border="0" align="bottom" height="50%">

Similarly, one can also specify pixel size by mentioning both "height" or "width" parameters, like so.  In this example, the image file display was changed to a 640 x 480 pixel resolution

<img src="http://SDM-SERVER:8080/CAisd/UploadServlet?ServerName=SDM-SERVER&amp;RepId=doc_rep:1000&amp;AttmntId=400104&amp;SecId=E42761128E82794C8D9E07280871AD7D&amp;Bpsid=0" alt="" vspace="0" hspace="0" border="0" align="bottom" height="640" width="480">