What I want is simple, to have a new image display everytime I refresh the page, that is working right now, my problem is selecting those images, there's hundreds of them, both .png and .jpg. Typing out each image by name or even renaming them seems incredibly inneficient, how can I change my code so it gets all the images in the 'images' folder?
Code posted.
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="style.css">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>✌</title>
</head>
<body> <!-- This piece of Javascript will randomly decide an image for your homepage. -->
<script>
var pictures = ['images/Aging.png', 'images/Teddy.png', 'images/Socrates.png',];
var picture = pictures[Math.floor(Math.random() * pictures.length)];
document.write('<img src="' + picture + '"/>');
</script>
</body>
</html>