0
<?php 
// Include database configuration file  
// Retrieve images from the database 
$query = $DB->query("SELECT * FROM images ORDER BY uploaded_date DESC"); 
    if(!$query) {
        trigger_error("Invalid query: " . $DB->error);
    }
if($query->num_rows > 0){ 
    while($row = $query->fetch_assoc()){ 
        $imageURL = '../phpgallery/'.$row["path"]; 
?>
    <a href="<?php echo $imageURL; ?>" data-fancybox="gallery" data-caption="<?php echo $row["title"]; ?>">
    <img src="<?php echo $imageURL; ?>" alt="" width="300"/>
</a>
<?php } 
} ?>

This is where images are fetched. I haven't got smaller thumbnail images and I would prefer not to.

    <script type="text/javascript">
        $('[data-fancybox="gallery"]').fancybox({
            // Options will go here
            arrows: true,
            loop: true,
            wheel: "auto",
            protect: true,
            buttons : [ 
                'zoom',
                'fullScreen',
                'close'
            ]
        });

Some images are stretched out filling the width of the screen.image of my website

There are two stretched images on the site, under 2gb. The lower one is overlapping the image below it.

(side now, loop and protect don't work)

Community
  • 1
  • 1

0 Answers0