I have next situation. In html I have 6 placeholders for images which I want to load dynamically:

```
 <div class="block">
     <div class="block_content" data-category="sport">
 </div>
 ... 5 more blocks

```

As I wrote - I want to load picture dynamically:

```
$('._block_content').each(function() {
        let $imageBlock = $(this),
            category = $(this).data('category');

    $.ajax({
        url: here is URL,
        dataType: 'json'
    }).then(function (data) {
            console.log('Success function loaded');
      },
      function () {
            console.log('Failed function loaded');
});

```

Now the problem is that such approach works well when pictures are found, and very slowly when not. If for example I will put wrong URL, first I will get 6 times **error net::ERR\_NAME\_NOT\_RESOLVED** and only then *failed functions* will be called. I need to wait near 3 seconds to get *failed functions* called.
Is there any way I can make async ajax requests inside loop more fast? Any ideas?