Your list is either
var list= document.querySelectorAll('.h5p-image > img')
OR
var list= document.querySelectorAll('.h5p-image > img[src$="5fa55a3d758c4.jpg"]') (using ends-with)
assuming you have more than one div with that image.
So the code is likely this to style the div
[...document.querySelectorAll('.h5p-image > img[src$="5fa55a3d758c4.jpg"]')]
.forEach(img => img.closest("div").style.width = "300px");
or this to just style the image
[...document.querySelectorAll('.h5p-image > img[src$="5fa55a3d758c4.jpg"]')]
.forEach(img => img.style.width = "300px");
Or if there is only ONE image
document.querySelector('.h5p-image > img').style.width = "300px"
[...document.querySelectorAll('.h5p-image > img[src$="758c4.jpg"]')]
.forEach(img => img.style.width = "300px");
<div class="h5p-image">
<img src="https://www.nice-premium.com/local/cache-vignettes/L600xH800/2012-03-19_08.53.13-758c4.jpg" alt="New image" title="" style="width: 100%; height: 100%;">
</div>
<div class="h5p-image">
<img src="https://www.nice-premium.com/local/cache-vignettes/L600xH800/2012-03-19_08.53.30-f371c.jpg" alt="New image" title="" style="width: 100%; height: 100%;">
</div>
<div class="h5p-image">
<img src="https://www.nice-premium.com/local/cache-vignettes/L600xH800/2012-03-19_08.53.13-758c4.jpg" alt="New image" title="" style="width: 100%; height: 100%;">
</div>