Plugin Directory

Changeset 3367153


Ignore:
Timestamp:
09/24/2025 11:48:32 AM (6 months ago)
Author:
petredobrescu
Message:

Version 3.11.1

🔧 The Compatibility & CDN Sync Update

Release Date: September 24, 2025

🛠️ Fixes & Improvements

  • PHP 8.4 Compatibility: Fixed a deprecation warning that appeared when running the plugin on PHP 8.4, ensuring smooth operation with the latest PHP versions.
  • Better CDN Replacement: Ensured that all image links (including those in both src and srcset attributes, when "BOTH" is selected from the settings) are now consistently replaced with their CDN counterparts for optimal delivery.

Update now to improve compatibility and get consistent, CDN-powered performance across your site! 🚀

Location:
shortpixel-adaptive-images
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • shortpixel-adaptive-images/tags/3.11.1/includes/controllers/regex-parser.class.php

    r3340495 r3367153  
    10611061                return $srcset;
    10621062            }
    1063             if(strpos($srcsetItem, $aiUrlBase) !== false || strpos($srcsetItem, $aiUrlBaseAmazon) !== false || strpos($srcsetItem, 'data:image/') === 0) {
     1063            if(
     1064                strpos($srcsetItem, $aiUrlBase) !== false
     1065                || (!empty($aiUrlBaseAmazon) && strpos($srcsetItem, $aiUrlBaseAmazon) !== false)
     1066                || strpos($srcsetItem, 'data:image/') === 0
     1067            ) {
    10641068                SHORTPIXEL_AI_DEBUG && $this->logger->log("REPLACE SRCSET abort - AI url: " . $srcsetItem);
    10651069                return $srcset; //already parsed by the hook.
    10661070            }
    1067             $prefix = strpos($aiUrl, 'http') === 0 ? '' : 'http:';
    1068             $aiSrcsetItems[] = $prefix . $aiUrl .'/' . ShortPixelUrlTools::absoluteUrl(trim($srcsetItem));
     1071// now we get ugly cdn url like this:
     1072// srcset="https://cdn.shortpixel.ai/spai/q_lossy+ret_img+to_webp/https://calin.shortpixel.com/wp-content/uploads/2025/02/image00031-1024x576.jpg 1024w
     1073// so we need to strip scheme from middle of url(origin) https://cdn.shortpixel.ai/spai/.../https://....
     1074            $parts = explode(' ', $srcsetItem, 2);
     1075            $url   = trim($parts[0]);
     1076            $desc  = isset($parts[1]) ? ' ' . trim($parts[1]) : '';
     1077
     1078            $abs = ShortPixelUrlTools::absoluteUrl($url);
     1079
     1080            $u = parse_url($abs);
     1081            $host  = isset($u['host']) ? $u['host'] : '';
     1082            $path  = isset($u['path']) ? $u['path'] : '';
     1083            $query = isset($u['query']) ? ('?' . $u['query']) : '';
     1084
     1085            $absNoScheme = $host . $path . $query;
     1086
     1087            $prefix = (strpos($aiUrl, 'http') === 0) ? '' : 'http:';
     1088            $aiSrcsetItems[] = $prefix . $aiUrl . '/' . $absNoScheme . $desc;
    10691089        }
    10701090        return implode(', ', $aiSrcsetItems);
  • shortpixel-adaptive-images/tags/3.11.1/includes/controllers/short-pixel-ai.class.php

    r3340495 r3367153  
    20172017            ? $this->settings->exclusions->excluded_paths
    20182018            : $this->settings->exclusions->eager_paths;
    2019         if (strlen($list)) {
     2019        if (!empty($list)) {
    20202020            if ($this->isExcluded($url, $list) || $this->isExcluded($normalizedUrl, $list)) {
    20212021                return true;
  • shortpixel-adaptive-images/tags/3.11.1/readme.txt

    r3340495 r3367153  
    55Tested up to: 6.8
    66Requires PHP: 5.6.40
    7 Stable tag: 3.11.0
     7Stable tag: 3.11.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    249249
    250250== Changelog ==
     251
     252= 3.11.1 =
     253
     254🔧 The Compatibility & CDN Sync Update
     255
     256Release Date: September 24, 2025
     257
     258🛠️ Fixes & Improvements
     259
     260* PHP 8.4 Compatibility: Fixed a deprecation warning that appeared when running the plugin on PHP 8.4, ensuring smooth operation with the latest PHP versions.
     261* Better CDN Replacement: Ensured that all image links (including those in both src and srcset attributes, when "BOTH" is selected from the settings) are now consistently replaced with their CDN counterparts for optimal delivery.
     262
     263Update now to improve compatibility and get consistent, CDN-powered performance across your site! 🚀
    251264
    252265= 3.11.0 =
  • shortpixel-adaptive-images/tags/3.11.1/short-pixel-ai.php

    r3340495 r3367153  
    44     * Plugin URI: https://shortpixel.com/
    55     * Description: Display properly sized, smart cropped and optimized images on your website. Images are processed on the fly and served from our CDN.
    6      * Version: 3.11.0
     6     * Version: 3.11.1
    77     * Author: ShortPixel
    88     * GitHub Plugin URI: https://github.com/short-pixel-optimizer/shortpixel-adaptive-images
     
    1616
    1717    if ( !class_exists( 'ShortPixelAI' ) ) {
    18         define( 'SHORTPIXEL_AI_VERSION', '3.11.0' );
     18        define( 'SHORTPIXEL_AI_VERSION', '3.11.1' );
    1919        define( 'SPAI_SNIP_VERSION', '3.1.0' );
    2020        define( 'SHORTPIXEL_AI_VANILLAJS_VER', '1.1' );
  • shortpixel-adaptive-images/trunk/includes/controllers/regex-parser.class.php

    r3340495 r3367153  
    10611061                return $srcset;
    10621062            }
    1063             if(strpos($srcsetItem, $aiUrlBase) !== false || strpos($srcsetItem, $aiUrlBaseAmazon) !== false || strpos($srcsetItem, 'data:image/') === 0) {
     1063            if(
     1064                strpos($srcsetItem, $aiUrlBase) !== false
     1065                || (!empty($aiUrlBaseAmazon) && strpos($srcsetItem, $aiUrlBaseAmazon) !== false)
     1066                || strpos($srcsetItem, 'data:image/') === 0
     1067            ) {
    10641068                SHORTPIXEL_AI_DEBUG && $this->logger->log("REPLACE SRCSET abort - AI url: " . $srcsetItem);
    10651069                return $srcset; //already parsed by the hook.
    10661070            }
    1067             $prefix = strpos($aiUrl, 'http') === 0 ? '' : 'http:';
    1068             $aiSrcsetItems[] = $prefix . $aiUrl .'/' . ShortPixelUrlTools::absoluteUrl(trim($srcsetItem));
     1071// now we get ugly cdn url like this:
     1072// srcset="https://cdn.shortpixel.ai/spai/q_lossy+ret_img+to_webp/https://calin.shortpixel.com/wp-content/uploads/2025/02/image00031-1024x576.jpg 1024w
     1073// so we need to strip scheme from middle of url(origin) https://cdn.shortpixel.ai/spai/.../https://....
     1074            $parts = explode(' ', $srcsetItem, 2);
     1075            $url   = trim($parts[0]);
     1076            $desc  = isset($parts[1]) ? ' ' . trim($parts[1]) : '';
     1077
     1078            $abs = ShortPixelUrlTools::absoluteUrl($url);
     1079
     1080            $u = parse_url($abs);
     1081            $host  = isset($u['host']) ? $u['host'] : '';
     1082            $path  = isset($u['path']) ? $u['path'] : '';
     1083            $query = isset($u['query']) ? ('?' . $u['query']) : '';
     1084
     1085            $absNoScheme = $host . $path . $query;
     1086
     1087            $prefix = (strpos($aiUrl, 'http') === 0) ? '' : 'http:';
     1088            $aiSrcsetItems[] = $prefix . $aiUrl . '/' . $absNoScheme . $desc;
    10691089        }
    10701090        return implode(', ', $aiSrcsetItems);
  • shortpixel-adaptive-images/trunk/includes/controllers/short-pixel-ai.class.php

    r3340495 r3367153  
    20172017            ? $this->settings->exclusions->excluded_paths
    20182018            : $this->settings->exclusions->eager_paths;
    2019         if (strlen($list)) {
     2019        if (!empty($list)) {
    20202020            if ($this->isExcluded($url, $list) || $this->isExcluded($normalizedUrl, $list)) {
    20212021                return true;
  • shortpixel-adaptive-images/trunk/readme.txt

    r3340495 r3367153  
    55Tested up to: 6.8
    66Requires PHP: 5.6.40
    7 Stable tag: 3.11.0
     7Stable tag: 3.11.1
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    249249
    250250== Changelog ==
     251
     252= 3.11.1 =
     253
     254🔧 The Compatibility & CDN Sync Update
     255
     256Release Date: September 24, 2025
     257
     258🛠️ Fixes & Improvements
     259
     260* PHP 8.4 Compatibility: Fixed a deprecation warning that appeared when running the plugin on PHP 8.4, ensuring smooth operation with the latest PHP versions.
     261* Better CDN Replacement: Ensured that all image links (including those in both src and srcset attributes, when "BOTH" is selected from the settings) are now consistently replaced with their CDN counterparts for optimal delivery.
     262
     263Update now to improve compatibility and get consistent, CDN-powered performance across your site! 🚀
    251264
    252265= 3.11.0 =
  • shortpixel-adaptive-images/trunk/short-pixel-ai.php

    r3340495 r3367153  
    44     * Plugin URI: https://shortpixel.com/
    55     * Description: Display properly sized, smart cropped and optimized images on your website. Images are processed on the fly and served from our CDN.
    6      * Version: 3.11.0
     6     * Version: 3.11.1
    77     * Author: ShortPixel
    88     * GitHub Plugin URI: https://github.com/short-pixel-optimizer/shortpixel-adaptive-images
     
    1616
    1717    if ( !class_exists( 'ShortPixelAI' ) ) {
    18         define( 'SHORTPIXEL_AI_VERSION', '3.11.0' );
     18        define( 'SHORTPIXEL_AI_VERSION', '3.11.1' );
    1919        define( 'SPAI_SNIP_VERSION', '3.1.0' );
    2020        define( 'SHORTPIXEL_AI_VANILLAJS_VER', '1.1' );
Note: See TracChangeset for help on using the changeset viewer.