I use this code in JS:
bigPhoto.setAttribute("width", "200rem");
The result is in pixel in html source,
But:
When I change it to 20rem the photo become really small.
I couldn't solve the problem which is mentioned in the photos.
The HTML width attribute only takes an integer number of pixels or a percentage (followed by a % sign).
If you wish to use CSS length units you have to use CSS (and set bigPhoto.style.width = "200rem"
.