'Image is getting transparent when width is give in eJS [closed]

I am generating pdf with the use of 'html-pdf' package in NodeJS using .ejs template. In the ejs file when I give width to the image it is getting transparent! What might be the reason?

.ejs file(i am not giving any style to the image):

...
<img src="http://localhost:8888/logo/1646733238094.png" alt="alt" style=""/>
...

the output of the above file is:

enter image description here

ejs file with the width (I am not applying any other style except width):

...
<img src="http://localhost:8888/logo/1646733238094.png" alt="ldksj" style="width: 50%;"/>
...

output for the above is:

enter image description here

as we can see it becomes transparent as we apply the width! does anyone know why this is happening??



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source