Another method using exactly a background image but not an Image Addon.
Add to the section everything that you need and add your class name. In my example it is my-class
.
CSS
.my-class {
aspect-ratio: 4;
}
The value of the aspect-ratio
property should be selected in accordance with the proportions of your background image.
This code will make the height of the section proportional to the background image.
But in this example, a proportional change in the background image will occur only until the height of the text is not more than the height of the section. After passing this threshold, the text will begin to push the section, not allowing a proportional change in height. And you will have to write additional code for the text to make it work at all breakpoints.
1400 px OK
1200 px OK
less then 1200 px NOT OK