Skip to main content

Files Gallery 0.14.0

· 4 min read
Karl Ward
Creator

Files Gallery 0.14.0 includes support for additional image formats HEIC HEIF PSD TIFF and DNG, new ImageMagick features and much more.

See demo Release info for Files Gallery 0.14.0

Additional Image Formats

In this release, we have added support for additional popular image formats HEIC HEIF PSD TIFF and DNG. These formats aren't supported natively in the browser, and must therefore be converted to JPG when loaded in the browser.

Image Formats Demo

Support for PHP Imagick

Previously, Files Gallery only supported ImageMagick when available from CLI with PHP exec(). We have now added support PHP Imagick, which means more users will get benefits of ImageMagick, like additional image formats, resizing and PDF thumbnails. This is especially useful since many hosting services will only have ImageMagick available from the PHP Imagick extension.

More Features

  • New logo Javascript config option inserts a custom logo at top of page [forum]
  • New header Javascript config option inserts custom html at the top of page.
  • New topbar Javascript config option inserts custom html above the topbar.
  • New on_select Javascript config event listener [forum]
  • New load_images_exclude Javascript config matches files that should not load thumbnails.
  • New resize_exclude Javascript config matches image types that should not be resized.
  • New imagemagick_image_types config option defines which additional image types to support.
  • New image_resize_use_imagemagick config option assigns ImageMagick to resize images.
  • New root_lock config option makes sure user roots are locked within a specific dir.
  • PDF dimensions are now extracted by ImageMagick so we can avoid layout thrasing [demo]
  • Folder preview images now support PDF and ImageMagick formats like HEIC and TIFF.
  • SVG files can now be used as custom preview images (both individual and global).
  • ?action=tests now checks for PHP imagick extension and PDF support in imagick.
  • ?action=tests now checks for Ghostscript support if ImageMagick is available.
  • ASP files can now be viewed and edited from the code highlighter.
  • Create video thumbnail from first frame if initial request from 3 seconds fails.
  • Workaround for incorrectly oriented images if missing exif or insufficient memory [forum]
  • Fixed a bug with invalid users that couldn't get deleted.
  • Removed pdf_thumbs config option (either it works or it doesn't).
  • Removed video_thumbs config option (either it works or it doesn't).
  • Removed image_resize_types config option (pointless).
  • Renamed config video_ffmpeg_path to ffmpeg_path so that it matches other app paths.
  • Added Malay language.

New Config Options

The following new PHP config options have been added.

_files/config/config.php
// creates all resized images with ImageMagick, instead of default PHP GD
'image_resize_use_imagemagick' => false,

// Image formats not supported in browsers, that we attempt to resize and convert with ImageMagick (when available)
'imagemagick_image_types' => 'heif, heic, tiff, tif, psd, dng',

New Javascript Options

The following new Javascript options have been added.

_files/js/custom.js
// regex to match imagemagick image types that should be converted even when supported in browser (Safari)
convert_native_formats: /tiff|dng/,

// convert HEIC images to JPG with Cloudflare (useful if you can't use ImageMagick) / https://developers.cloudflare.com/images/ <=5000 FREE
cloudflare_convert: true,

// insert custom header html at top of page (goes behind sidebar)
header: '<a href="#">link 1</a>',

// regex to match file types (mime) that should not attempt to load images into the layout
load_images_exclude: /video|jpeg/,

// inserts a logo from given path into the topbar / use CSS to adjust if required
logo: './_files/logo/logo.png',

// custom select handler including event and clicked item object with properties
on_select: (e, item) => {
console.log('on_select', item);
},

// regex to match image types that should not be resized / useful if you want to always load original gif animations
resize_exclude: /gif/,

// insert custom topbar html, above main topbar
topbar: '<a href="#">link 1</a><a href="#">link 1</a><a href="#">link 1</a>',

How to update?

Simply download latest Files Gallery index.php or see the update docs.