I need help to understand one thing: a picture tag behaves like a container for an img tag if its parent has 'display: flex'. If I add width:50% to img, it doesn't make img 50% of div but make img 50% of picture. If I add width:50% to picture and width: 100% to img it works as I need. But why do I need to add style to the picture to make img 50% of div? I thought that picture is just an invisible wrap to keep sources. But it behaves like a div. Why?
<div style="display: flex;">
<picture style="width: 50%">
<source srcset="img/cmn/logo.webp" type="image/webp">
<img src="image.png" alt="img" style="width: 100%;">
</picture>
</div>