I have a couple of dynamically added containers to another container (let's call those items Loading solutions). Inside every Loading Solution, I would like to add as many truck icons as the Loading Solution has in its configuration.
So, for example:
- solution 1 has only 1 loading, so it should only display 1 truck.
- solution 2 has 5 loadings and should display 5 trucks.
- solution 3 has 20 loadings and should display 20 trucks.
Now the problem is that eventually, all those truck icons do not fit in the container anymore.
How could I automatically resize the images inside every Loading Solution container while still generating them dynamically?
This is what it looks like right now:

But this is what I want to achieve:

Edit: This is my Vue template for the truck icons
<div class="trucks">
<div class="truck-img d-inline-block mr-4" v-for="i in item.loads" :key="`load-${i}`">
<img src="@/__app_assets/img/truck.png" alt="truck" />
</div>
</div>