You could add a check to only display the item if it exists:
<?php if ( $imagen4 ) { ?>
<li class="artiq-slidder-item"> <img src="https://wordpress.stackexchange.com/questions/269610/<?php echo $imagen4["url'] ?>"></li>
<?php } ?>
But it looks like you are using the Advanced Custom Fields plugin. If this is the case, you would probably be better off using a repeater field, and specifying a minimum number of images. Then, display it in a loop.
<?php if( have_rows('images') ): ?>
<div class="artiq-slidder-detalle-wrap">
<div class="artiq-slidder detalle-slidder">
<ul class="artiq-slidder-ul">
<?php while( have_rows('imagen') ): the_row();
$imagen = get_sub_field('imagen');
?>
<li class="artiq-slidder-item"> <img src="https://wordpress.stackexchange.com/questions/269610/<?php echo $imagen["url'] ?>"></li>
<?php endwhile; ?>
</ul>
</div>
</div>
<?php endif; ?>
(The above code assumes your repeater is named “images”)