I am working on a script in which I have used a php code to display images from a specific folder on a webpage with the height and width of 1 pixel
<?php
$files = glob("images/*.*");
for ($i=1; $i<count($files); $i++)
{
$num = $files[$i];
print $num."<br />";
echo '<img src="'.$num.'" alt="random image" height="1px" width="1px" />'."<br /><br />";
}
?>
this script is working fine and display images on my webpage with the height and width of 1 pixel that are too small. but now I want to reduce images file size of each displayed image (that are showing with the height and width of 1 pixel ) on a webpage to avoid webpage loading issue. Anyone help me by jquery or javascript to reduce image file size.