Download the PHP package oliverthiele/ot-gallery without Composer

On this page you can find all versions of the php package oliverthiele/ot-gallery. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package ot-gallery

OT Gallery — TYPO3 Gallery Extension

A gallery extension for TYPO3 v13 and v14 built around one core idea: image sizes are calculated mathematically from your Bootstrap grid configuration, and all variants are pre-generated via CLI — so the first page load after a cache clear is just as fast as every subsequent one.

TYPO3 Packagist Version PHP


Why another gallery extension?

Most TYPO3 gallery extensions generate processed images on the first frontend request — which means a slow, blocking page load whenever the TYPO3 cache is cleared. They also require you to manually specify image widths that match your grid, or they produce srcset values that don't match the actual rendered size.

OT Gallery takes a different approach:


Features


Requirements

Requirement Version
TYPO3 14.3+
PHP 8.4+
Bootstrap 5.x
Fancybox 5.x (if lightbox enabled)

Installation

Then run the TYPO3 setup:


Configuration

1. Add SiteSet

Include the SiteSet in your site configuration (config/sites/yoursite/config.yaml):

2. Add Routing

Include the pagination route enhancer to get SEO-friendly pagination URLs (?tx_otgallery_page=2 → /page-2):

3. Add SCSS

Copy or import the example stylesheet into your project build:

Or copy Resources/Private/Scss/Example.scss into your project and adapt as needed.

4. Initialize Bootstrap JavaScript

The three-dot context menu (description, copyright, download) uses Bootstrap Dropdown. Ensure Bootstrap JS is initialized on your page:

5. Include Fancybox

If you use the lightbox feature, include Fancybox 5 in your project:

Then initialize:


SiteSet Settings

All settings can be configured in your site's SiteSet or overridden per content element via FlexForm.

Grid & Breakpoints

Setting Default Description
otGallery.grid.columns.xs 1 Columns on xs screens
otGallery.grid.columns.sm 2 Columns on sm screens
otGallery.grid.columns.md 3 Columns on md screens
otGallery.grid.columns.lg 4 Columns on lg screens
otGallery.grid.columns.xl 5 Columns on xl screens
otGallery.grid.columns.xxl 6 Columns on xxl screens
otGallery.grid.gutter 24 Gutter width in px
otGallery.grid.container.padding 12 Container padding in px (one side)
otGallery.grid.container.sm.maxWidth 540 Container max-width at sm in px
otGallery.grid.container.md.maxWidth 720 Container max-width at md in px
otGallery.grid.container.lg.maxWidth 960 Container max-width at lg in px
otGallery.grid.container.xl.maxWidth 1140 Container max-width at xl in px
otGallery.grid.container.xxl.maxWidth 1320 Container max-width at xxl in px

Thumbnail Defaults

Setting Default Description
otGallery.thumbnail.aspectRatio free Default aspect ratio (free, 1:1, 4:3, 3:2, 16:9)
otGallery.thumbnail.rendering cover Object-fit mode (cover, contain, fill)

Lightbox

Setting Default Description
otGallery.lightbox.captionFields title,description,copyright Comma-separated fields shown in lightbox caption
otGallery.lightbox.dataAttribute data-fancybox HTML data attribute used to trigger the lightbox

Pagination

Setting Default Description
otGallery.pagination.itemsPerPage 48 Images per page (0 = unlimited)

Processing (CLI)

Setting Default Description
otGallery.processing.hiDpi true Generate 2x variants for retina displays
otGallery.processing.webp.quality 82 WebP quality (1–100)
otGallery.processing.jpeg.quality 85 JPEG quality (1–100)

FlexForm Options (per content element)

Layout tab

Sort tab

Features tab


CLI: Image Pre-Processing

Pre-process all gallery images to avoid server load when caches are cleared:

The command uses a configuration hash (MD5) stored per content element to detect when image dimensions need to be recalculated (e.g. after changing column counts or SiteSet grid settings).

The CLI uses ImageService::applyProcessingInstructions() — identical to the frontend ViewHelpers — so the pre-generated files produce exact cache hits on the first page load. No images are re-processed by the frontend.


Template Customization

The extension follows TYPO3's template override convention. Override paths in your TypoScript:

Available template variables

Variable Type Description
{gallery.images} FileInterface[] Images on current page
{gallery.allImages} FileInterface[] All images (all pages)
{gallery.totalCount} int Total image count
{gallery.paginator} ArrayPaginator TYPO3 paginator object
{gallery.pagination} SimplePagination TYPO3 pagination object
{gallery.sizesAttribute} string Calculated sizes attribute string
{gallery.imageWidths} array Calculated widths per breakpoint (incl. @2x keys)
{gallery.rowColsClasses} string Bootstrap row-cols-* class string
{gallery.aspectRatioCss} string CSS-formatted ratio (4/3) or empty string
{gallery.effectiveLayout} string Active layout name (grid, masonry, …)
{gallery.flex} array All FlexForm settings
{gallery.lightboxCaptionFields} array Map of title/description/copyright => bool for lightbox captions
{gallery.source} string files or folder

ViewHelpers

ViewHelper Description
ot:gallerySrcset Generates srcset attribute string for all unique widths
ot:galleryImageSrc Returns processed image URL for a single width (use for src fallback)
ot:lightboxCaption Assembles lightbox caption string from image metadata fields

SiteKit Integration (optional)

If your project uses OT SiteKit Base, the extension ships with a Configuration/SiteKit.yaml that registers ot_gallery with the SiteKit grid system:

This tells SiteKit that the gallery requires at least 6 grid columns and does not need to span the full width. Without SiteKit installed, this file is simply ignored.


Planned Features


License

GPL-2.0-or-later — see LICENSE

Author

Oliver Thiele — oliver-thiele.de


All versions of ot-gallery with dependencies

PHP Build Version
Package Version
Requires php Version >=8.4
typo3/cms-core Version ^14.3
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package oliverthiele/ot-gallery contains the following files

Loading the files please wait ...