<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<div class="images">
<img src="img1.jpeg" alt=""width="500">
<img src="img2.png" alt=""width="500">
<img src="img3.jpg" alt=""width="500">
<img src="img4.webp" alt=""width="500">
<img src="img5.jpeg" alt=""width="500">
</div>
</body>
<style>
.images img{
display: none;
}
</style>
<script>
let images = Array.from(document.querySelectorAll('.images img'))
let random = Math.floor(Math.random()*images.length)
let item = images[random]
item.style.display = "unset"
</script>
</html>