Conditionally hide a slide/div in image carousel based on whether the image source is present

I'm using WP All Import to import a number of images. For each item that gets imported, the number of images can vary so, I am importing a maximum of 100 images at a time. If the item doesn't have an image it creates this:

<div class="mySlides">
      <img src="" style="width: 100%; display: none;" onerror=" = "none"">

When using the next/previous arrows of the image carousel, it triggers for the div to show, and no image is displayed, so I am left with a blank slide. I would prefer the slide not to show at all, and just rotate back through to the first slide that does contain an image.

Can someone help me determine the right script for this? Hopefully, I've explained it well enough... :/

How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum