rst renderer: figure/picture not scaled to relative width

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

Summary

RestructuredText supports a width attribute in the figure or picture directive:

width : length or percentage of the current line width The width of the image. Used to reserve space or scale the image horizontally. As with "height" above, when the "scale" option is also specified, they are combined.

Unfortunately setting this attribute to e.g. 50% does not work.

Steps to reproduce

create a rst document with a figure or picture in it. Set the width attribute to e.g. to 50%, view it though gitlab. (How one can reproduce the issue - this is very important)

Example Project

https://gitlab.com/bearsh/rst-scale-demo/blob/master/README.rst

What is the current bug behavior?

Gitlab does not respect the width, the image is displayed at it actual size.

What is the expected correct behavior?

Gitlab should scale the image to the requested (text)width.

Edited by 🤖 GitLab Bot 🤖