Adaptative image size

Hi guys,

I need your help with the Image component. I explain it.

When I add some component with size parameters to 100% (setSizeFull()) into layout, the first is adapted to second. To here is all correct.
But, when I add an Image component this image maintains its size and being outside the size of the layout.

If I edit with the browser developer tools the definitive tag and add width=“100%” attribute (not style), it works! But I don’t know how access to this attribute from java code.

Can you help me?

Thank a lot in advance.
Alejandro Segura

I response me.

I’ve changed the Image component to Embedded, like the next:

Embedded embedded = new Embedded(null, getFileResource(imageRelativePath));
embedded.setWidth(100, Unit.PERCENTAGE);

Alejandro Segura