Koha Photo Archive Builder

A simple tool for preparing a folder of patron/member photographs for upload into the Koha Library Management System.

Folder Based Automatic ZIP Browser Processing Secure Access

What is this tool?

The Koha Photo Archive Builder helps library staff quickly prepare a folder containing patron/member photographs for Koha photo uploading.

Select a Folder

Choose the folder containing your member or patron photographs directly from your computer.

Automatic ZIP

The selected folder is compressed in your browser into a ZIP archive before it is sent to the server.

Koha Ready

The resulting archive can be passed to the upload process for preparing patron photographs for Koha.

How the tool works

Most of the initial processing happens inside your web browser. No separate ZIP application is required.

1

Select your photo folder

Click the folder selection area and choose the folder containing the patron photographs.

2

The browser reads the folder

The application reads the selected files using the browser's folder-selection functionality.

3

Images are identified

The application counts files with supported image extensions such as JPG, JPEG, PNG, GIF, BMP and WebP.

4

A ZIP archive is generated

JSZip creates a ZIP archive directly in the browser. The generated archive is prepared as patron_folder.zip.

5

The archive is uploaded

When you click the processing button, the generated ZIP file is submitted to the server through upload.php.

6

Continue with the Koha photo process

The server-side upload process can then process the archive and prepare the photographs according to the application's Koha workflow.

Photo and file requirements

For the best results, organize your patron photographs before selecting the folder.

Recommended file naming

Use the patron/card number as the filename where appropriate. For example: 3638.jpg. This makes it easier for the server-side process to associate photographs with patron records.

Supported image formats

JPG / JPEG
PNG
GIF
BMP
WebP
Important

The browser counts the supported image formats listed above, but the ZIP creation code currently adds other non-hidden files too. For a clean Koha photo archive, it is best to keep the selected folder dedicated to the photographs and avoid unrelated documents.

Keep patron photos in one folder.
Prefer filenames based on patron/card numbers.
Use supported image formats.
Remove unrelated files from the folder.
Avoid hidden/system files where possible.

Step-by-step instructions

Follow these steps whenever you need to prepare a batch of patron photographs.

1

Prepare your photographs

Place the photographs you want to process into a single folder. Make sure the filenames are correct before starting.

2

Open Photo Uploader

Open the Koha Photo Archive Builder from the Library Koha Suite. You must be logged in to access the tool.

3

Click "Photo Folder"

Click the large folder area and select your photo directory.

4

Wait for ZIP generation

The message will change to indicate that the folder is being zipped in the browser. Wait until the Ready status appears.

5

Check the photo count

Review the displayed folder name, total file count and number of detected photographs.

6

Process the archive

Click "Process & Generate photo.zip" to send the generated archive to the server.

Ready status

If the selected folder contains supported images, the application enables the processing button and displays a green Ready indicator.

Security and privacy

The Photo Uploader is integrated with the Library Koha Suite's authenticated environment.

Login Required

Access to the page is checked through the suite's authentication system before the uploader is displayed.

Usage Tracking

The application can record tool access using the suite's trackToolAccess() function.

Browser-Side ZIP Creation

The initial ZIP archive is generated in the user's browser using JSZip before the archive is submitted.

Session Information

The interface displays the authenticated user's name and the current date/time from the server session.

Protect patron information

Patron photographs may be personal information. Only upload photographs that you are authorized to process, and follow your library's data-protection policies.

Troubleshooting

The processing button is disabled
Make sure you selected a folder and that the folder contains at least one supported image file: JPG, JPEG, PNG, GIF, BMP, or WebP.
It says "No image files found"
Check the file extensions in your folder. The application checks image extensions in lowercase form, so normal extensions such as .jpg and .JPG are handled after conversion to lowercase.
ZIP generation is taking a long time
ZIP creation occurs in the browser. Very large folders, large photographs, or a large number of photographs can require additional processing time and browser memory. Wait for the Ready message before submitting.
The folder contains unrelated files
The current ZIP creation code adds non-hidden files to the archive, while the application separately counts supported image files. For best results, use a folder containing only the photographs intended for the Koha process.
The ZIP upload failed
First try selecting the folder again. If the problem continues, check the server's upload limits and the processing logic in upload.php. Very large ZIP files may also be affected by PHP upload or server configuration limits.
Can I select individual files?
The current interface is designed around folder selection using the browser's webkitdirectory functionality. Select the complete folder containing the photographs rather than selecting files individually.

Frequently Asked Questions

Does the tool resize photographs?
No resizing or image compression is performed by the JavaScript shown in this page. The browser creates a ZIP archive containing the selected files. Any image resizing, conversion, validation, or Koha-specific processing would need to be performed by the server-side upload process.
Does the tool rename my photographs?
The JavaScript shown does not rename the photographs. It preserves the file's relative path after removing the selected root folder name.
Why should filenames contain card numbers?
A filename such as 3638.jpg provides a straightforward identifier that a server-side process can use when matching a photograph to a Koha patron record. The exact matching behavior depends on the implementation of upload.php.
Is the ZIP file created on the server?
The initial ZIP is created in the browser using the JSZip library. The resulting file is then placed into the hidden upload field and submitted to the server.
What is the generated ZIP called?
The JavaScript creates the browser-side file with the name patron_folder.zip. The final name or processing result may be changed by the server-side upload.php process.
What happens if I select an empty folder?
The application does not enable the processing button unless at least one supported image is detected.

Quick Reference

Input

A folder containing patron/member photographs.

Images

JPG, JPEG, PNG, GIF, BMP and WebP are detected.

Output

A browser-generated ZIP archive submitted to upload.php.

Need assistance?

If the uploader continues to fail after checking the folder contents and image filenames, contact your Library Koha Suite administrator and provide the approximate number and size of photographs being processed.