Skip to content

Software Development at Program Tom LTD

Place for coding, programming, development and software in general.

Menu
  • Blog
  • PDF Booklets
  • Dev Utils & Content
  • Java Spring Boot Or Web Apps
  • English
    • български
    • English
    • Español
    • Português
    • हिन्दी
    • Русский
    • Deutsch
    • Français
    • Italiano
    • العربية
  • About Us
  • Cart
Menu

[Yet Another] Single File PHP Script Image Gallery

[Yet Another] Single File PHP Script Image Gallery

$1.99

Category: PHP
  • Description

Description

Here’s a simple Single File PHP Image Gallery Script. It scans a directory for images and displays them in a grid layout. Just place this script in a folder containing images, and it will generate a gallery automatically.

Features

This script dynamically scans the current directory for images and displays them as a gallery. Just place your images in the same folder as the script, and it will generate the gallery automatically. For that reason the first open may be a little bit slower – depending on the number of images you have.

It supports also taking into account mp4 and mov videos and displays them directly (without thumbnailing)

Requirements

The script has been tested on Ubuntu with PHP 8.0

1) GD extension

  1. Enable GD in PHP
    • If you’re using XAMPP/WAMP, open php.ini and uncomment the line:
      extension=gd
      

      Then restart Apache.

    • If you’re on Linux, install GD with:
      sudo apt-get install php-gd
      

      Then restart Apache:

      sudo service apache2 restart
      
    • If you’re on Windows, find php.ini, search for ;extension=gd, remove the ;, and restart your server.
  2. Check if GD is enabled
    Run this script:

    <?php
    phpinfo();
    ?>
    

    Search for “GD” in the output.

 

Troubleshooting

If you get a 500 error usually means a fatal PHP error.

Enable Error Reporting

Before checking anything else, modify the beginning of your script to show errors:

error_reporting(E_ALL);
ini_set('display_errors', 1);

Check File Permissions

chmod -R 755 thumbnails

Related products

  • Hashing

    Hashing File Storage Façade – PHP Soon

    $2.99
    Read more
  • Custom HTML and JavaScript Inserter into WordPress Blog Posts

    Custom HTML and JavaScript Inserter into WordPress Blog Posts

    $1.99
    Add to cart
  • User Profile Authenticated

    Minimal PHP User Authenticated App

    $4.99
    Read more
  • Custom JavaScript & CSS in WordPress Pages

    Custom JavaScript & CSS in WordPress Pages

    $1.99
    Add to cart
  • Prompt-to-Production: How AI is Forcing Us to Build Higher Quality Software
  • Debug Web View Flutter App
  • Skipping AI? You’re a Relic – Time to Evolve or Perish!
  • 2026 Flutter Launch Blueprint: Your 10-Step Checklist to App Store Domination
  • Product Requirements Document – for different software development levels

Categories

  • Apps (25)
  • ChatGPT (27)
  • Choosing a Framework (38)
  • Flutter (281)
  • Graphical User Interface (14)
  • Marketing (119)
  • Software Development (292)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (16)

Tags

Algorithms (9) crypto (29) flutterdev (39) General (86) Java (7) QR & Bar Codes (3) Software Dev Choices (33) Spring Boot (1) standards (1) Theme (3) User Authentication & Authorization (9) User Experience (10) Utilities (19) WordPress (11)

Product categories

  • All Technologies (87)
    • Flutter Apps (26)
    • GPT (4)
    • Java (39)
    • Native Android (3)
    • PHP (9)
    • Spring (Boot) / Quarkus (36)
    • Utils (15)
    • Vaadin 24+ (28)
    • Vaadin 8 (1)
  • Apps (18)
    • Employees DB (1)
    • Notes (6)
    • Personal Budget (1)
    • Recipes Book (1)
    • Stuff Organizer (1)
    • To-Do (2)
  • PDF Books (3)
  • Source Code Generators (8)

Recent Posts

  • Prompt-to-Production: How AI is Forcing Us to Build Higher Quality Software
  • Debug Web View Flutter App
  • Skipping AI? You’re a Relic – Time to Evolve or Perish!
  • 2026 Flutter Launch Blueprint: Your 10-Step Checklist to App Store Domination
  • Product Requirements Document – for different software development levels

Post Categories

  • Apps (25)
  • ChatGPT (27)
  • Choosing a Framework (38)
  • Flutter (281)
  • Graphical User Interface (14)
  • Marketing (119)
  • Software Development (292)
  • Spring (45)
  • StartUp (22)
  • Uncategorized (14)
  • Uncategorized (4)
  • Vaadin (16)