Make WordPress Core

Changeset 59140


Ignore:
Timestamp:
09/30/2024 10:31:35 PM (6 weeks ago)
Author:
desrosj
Message:

Upgrade/Install: Indicate JPEG XL support when checking upgrades.

This adds tracking of the JPEG XL image type support alongside WebP, HEIC, and AVIF image types when requesting an upgrade from WordPress.org.

This will check for JPEG XL support in both ImageMagick and GD, even though GD technically does not yet have support for JPEG XL.

Props deepakrohilla, swissspidy, dd32, ayeshrajans, samiamnot, joemcgill.
Fixes #62050.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/update.php

    r59018 r59140  
    116116        $gd_info = array_filter( $gd_info );
    117117
    118         // Add data for GD WebP, AVIF and HEIC support.
     118        // Add data for GD WebP, AVIF, HEIC and JPEG XL support.
    119119        $query['image_support']['gd'] = array_keys(
    120120            array_filter(
     
    123123                    'avif' => isset( $gd_info['AVIF Support'] ),
    124124                    'heic' => isset( $gd_info['HEIC Support'] ),
     125                    'jxl'  => isset( $gd_info['JXL Support'] ),
    125126                )
    126127            )
     
    129130
    130131    if ( class_exists( 'Imagick' ) ) {
    131         // Add data for Imagick WebP, AVIF and HEIC support.
     132        // Add data for Imagick WebP, AVIF, HEIC and JPEG XL support.
    132133        $query['image_support']['imagick'] = array_keys(
    133134            array_filter(
     
    136137                    'avif' => ! empty( Imagick::queryFormats( 'AVIF' ) ),
    137138                    'heic' => ! empty( Imagick::queryFormats( 'HEIC' ) ),
     139                    'jxl'  => ! empty( Imagick::queryFormats( 'JXL' ) ),
    138140                )
    139141            )
Note: See TracChangeset for help on using the changeset viewer.