For testing purposes, I have uploaded the script on my server.
$path_of_the_file_to_load = [
"images/1.jpg",
"images/2.jpg",
"images/3.jpg",
"images/4.jpg",
"images/5.jpg",
"images/6.jpg",
"images/7.jpg",
"images/8.jpg"
];
$height = should be a number;
$width = should be a number;
Example: