knowledge article image proportions are not maintained

soumya19
Tera Contributor

Hi,

 

I have a requirement that, when i insert the image to an knowledge article using the insert/edit image from knowldge form, the width and height of the image is automatically populated with the original image size.

soumya19_0-1675619679154.png

 

but when i am trying to resize the image, if i change the width the height is not changing. the image quality is getting deformated

soumya19_1-1675619746504.png

 

can this be acheived ? if the change the width then its height should be adjusted automatically.

 

2 REPLIES 2

Allen Andreas
Administrator
Administrator

Hi,

Unfortunately, there doesn't seem to be a way to "lock proportions" on an image so that when you adjust one value, the other adjusts as well (which locks the proportions and keeps it from being distorted). It's recommended to adjust it outside of the ServiceNow platform, grab those values, then use those within the platform, etc.

Using any sort of script or trying to customize the platform to account for this isn't ideal. Each image is different and others may be fine without locked proportions.

Please mark reply as Helpful/Accept Solution, if applicable. Thanks!


Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

Community Alums
Not applicable

Hi @soumya19 ,

This Article will help you to Use Images Effectively in a Knowledge Base (KB) Article 

Also, you can try :

Update the Style Sheet called Knowledge Common Styles and add some max-height and max-width properties.



SandeepDutta_0-1675659439729.png