9

With reference to the answer presented here by Kay https://stackoverflow.com/a/21998722/9373320, I want to reduce the inserted image size to 50% both height and width.

mainPanel( img(src='myImage.png', align = "right"), ### the rest of your code )

Please help.

sumanta das
  • 250
  • 1
  • 3
  • 11

1 Answers1

15

Just type height and width in the image tag:

img(src="src", height="50%", width="50%", align="right")
SeGa
  • 9,454
  • 3
  • 31
  • 70
  • 1
    In this answer you could just keep the parameter `width="100%"` and get the same result, without the "height" parameter. But I am not shure if this is what was asked, because in this solution you are transforming the image to 50% of screen width, but you are not necessarally reducing the image to 50% of it's original size. – Wlademir Ribeiro Prates May 15 '18 at 18:10
  • Thanks SeGa, its woking. I also got that below code is also working `img(src='Image.png',style="width: 50px")`. – sumanta das May 17 '18 at 04:38