Skip to content

Commit

Permalink
Add support for AVIF images.
Browse files Browse the repository at this point in the history
  • Loading branch information
arnowelzel committed Nov 29, 2024
1 parent 07ed6db commit b5978c2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lightbox-photoswipe.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Lightbox with PhotoSwipe
Plugin URI: https://wordpress.org/plugins/lightbox-photoswipe/
Description: Lightbox with PhotoSwipe
Version: 5.5.1
Version: 5.5.2
Author: Arno Welzel
Author URI: http://arnowelzel.de
Text Domain: lightbox-photoswipe
Expand Down
8 changes: 6 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Contributors: awelzel
Tags: lightbox, photoswipe, attachments, images, gallery
Requires at least: 5.3
Tested up to: 6.7
Stable tag: 5.5.1
Stable tag: 5.5.2
Donate link: https://paypal.me/ArnoWelzel
License: GPLv2
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down Expand Up @@ -153,6 +153,10 @@ If you change any of the stylesheets or frontend scripts in `src/js` or `src/lib

== Changelog ==

= 5.5.2 =

* Added support for AVIF images.

= 5.5.1 =

PhotoSwipe 5 integration:
Expand All @@ -167,7 +171,7 @@ PhotoSwipe 5 integration:

= 5.4.1 =

* Updated compatibility information for WordPress 6.7.
* Updated compatibility information for WordPress 6.7.

= 5.4.0 =

Expand Down
4 changes: 2 additions & 2 deletions src/LightboxPhotoSwipe/LightboxPhotoSwipe.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
class LightboxPhotoSwipe
{
const VERSION = '5.5.1';
const VERSION = '5.5.2';
const SLUG = 'lightbox-photoswipe';
const META_VERSION = '19';
const CACHE_EXPIRE_IMG_DETAILS = 86400;
Expand Down Expand Up @@ -326,7 +326,7 @@ public function callbackProperties(array $matches)
$captionTitle = '';
$captionFilename = '';
$isLocal = false;
if (!in_array($extension, ['jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico', 'webp', 'svg'])) {
if (!in_array($extension, ['jpg', 'jpeg', 'jpe', 'gif', 'png', 'bmp', 'tif', 'tiff', 'ico', 'webp', 'svg', 'avif'])) {
// Ignore unknown image formats
$use = false;
} else {
Expand Down

0 comments on commit b5978c2

Please sign in to comment.