Display KB Article PNG image full-width.

RaViCZ
Tera Expert

Hi everyone, in the backend I see the PNG image inserted into the KB article displayed full-width.

Is there any way to achieve this on the portal?

1 ACCEPTED SOLUTION

Hello @RaViCZ ,

 

Thanks. There is a typo: it's "max-width", not "max-widt". Once you fix this it will work.

 

Regards,

Robert

View solution in original post

10 REPLIES 10

Robert H
Mega Sage

Hello @RaViCZ ,

 

Can you please provide a screen shot that illustrates what you mean?

 

By default the pictures in a Knowledge Article are in fact shown in their full width in Employee Center, see below. Please note that, if the width is larger than the widget then you have to use the horizontal scroll bars to see the entire picture:

RobertH_0-1747755678122.png

 

Or are you asking how the picture can be scaled to the width of the portal widget?

In that case you would have to edit the HTML code of the KB Article, like this:

 

RobertH_0-1747756394572.png

 

The attribute you need to add is:

style="max-width: 100%;"

 

Result:

 

RobertH_1-1747756527614.png

 

Regards,

Robert

 

Hello Robert,

thanks for the reply.

"if the width is larger than the widget, then you have to use the horizontal scroll bars" - This is exactly what I don't want :-).

 

I would like to display it across the entire window, like it is possible in the backend.

RaViCZ_0-1747991072031.png

 

RaViCZ_1-1747991183926.png

Radek

 

Hello @RaViCZ ,

 

Did you try the scaling solution I provided in the second half of my post? That's the only way to show such a large picture in its entirety.

 

The Service Portal widget for rendering KB Articles has a fixed maximum width, so it's impossible to show a picture that is wider than that without scrolling. And even if that widget was as wide as your screen, as soon as there's a picture wider than that you'd have to scroll again.

 

Also, I noticed that the particular picture in your article consists of many small individual pictures. So as a practical solution you could add those smaller pictures to the article and arrange them to be underneath each other.

 

Regards,

Robert

 

Yes I tried the scaling method, it didn’t work. Seems that it’s limited by the widget’s max width. 

 

The article contains only one image.

 

Actually, when I click the image, it shows full size, as I want, it would be solved if that could happen automatically.

Radek