How to stretch the block to the width of the picture?
There is a block with text, which can be a picture (the size of the image is unknown). The minimum block size will be 200px, the maximum is 400. You need to block has always been the minimum size, but only as long as there are no pictures. The same unit with the image needs to stretch along its width, but a maximum of 400px.
If you set max-width, the block tends to stretch the entire width at once, regardless of the presence of a picture and its size.
Maybe someone faced how to do it?