diff --git a/README.md b/README.md index 577bf33..855d8a2 100644 --- a/README.md +++ b/README.md @@ -62,7 +62,7 @@ ### Assistance In your are in immediate need of commercial help/advice/assistance, I can offer you my assistance for a small fee. - Please do contact me via my email or if you cannot do so open an issue. + Please do contact me via my the [consultation page](https://mecanik.dev/en/consulting/) or if you cannot do so open an issue. ### Support me Buy me a coffee to give me more energy and write more code :) diff --git a/cf-image-resizing/cf-image-resizing.php b/cf-image-resizing/cf-image-resizing.php index cbb232a..ca04c6c 100644 --- a/cf-image-resizing/cf-image-resizing.php +++ b/cf-image-resizing/cf-image-resizing.php @@ -3,7 +3,7 @@ * Plugin Name: Cloudflare Image Resizing * Plugin URI: https://wordpress.org/plugins/cf-image-resizing/ * Description: Optimize images on-the-fly using Cloudflare's Image Resizing service, improving performance and core web vitals. -* Version: 1.5.3 +* Version: 1.5.5 * Author: Mecanik * Author URI: https://mecanik.dev/en/?utm_source=wp-plugins&utm_campaign=author-uri&utm_medium=wp-dash * License: GPLv3 or later @@ -20,7 +20,7 @@ require_once('config.php'); -define('CF_IMAGE_RESIZING_VERSION', '1.5.3'); +define('CF_IMAGE_RESIZING_VERSION', '1.5.5'); // Utilities class class Utils @@ -528,7 +528,7 @@ public static function hook_content_filter($content) return $content; } - @preg_match_all('/]*?src="(https?:\/\/[^"]+?)"[^>]*?>/', $content, $image_tags); + @preg_match_all('/]*?(src|data-src|data-src-.*)="(https?:\/\/[^"]+?)"[^>]*?>/', $content, $image_tags); $img_tags = \array_replace([], $image_tags[0]); $img_urls = \array_replace([], $image_tags[1]); @@ -597,7 +597,7 @@ public static function hook_content_filter($content) } // Do the replacement of src="" for this image tag - $img_tags[$index] = @preg_replace('/src\s*=\s*"([^"]*)".*?/', 'src='.$img_urls[$index].'', $img_tags[$index]); + $img_tags[$index] = @preg_replace('/(src|data-src|data-src-.*)\s*=\s*"([^"]*)".*?/', 'src='.$img_urls[$index].'', $img_tags[$index]); // Add missing width and height if desired and necessary if(CF_IMAGE_RESIZING_ADD_MISSING_SIZES === TRUE) @@ -1143,7 +1143,7 @@ function send_cf_image_resizing_admin_feedback() 'server_type' => Utils::get_server_type(), 'server_version' => Utils::get_server_version(), 'date_created' => current_time('mysql'), - 'region' => $region['recommended-storage-region'], + 'region' => isset($region['recommended-storage-region']) ? $region['recommended-storage-region'] : "weur", ]), 'method' => 'PUT', 'data_format' => 'body' diff --git a/cf-image-resizing/readme.txt b/cf-image-resizing/readme.txt index 233c9aa..2f4203f 100644 --- a/cf-image-resizing/readme.txt +++ b/cf-image-resizing/readme.txt @@ -3,8 +3,8 @@ Contributors: Mecanik Donate link: https://github.com/sponsors/Mecanik Tags: image, image-optimization, image-resizing, cloudflare images, optimizer, optimize, cloudflare, cloudflare-image-resizing, resize-images, performance, pagespeed, core web vitals, seo, speed, smush, jpg, png, gif, compression, compress, images, pictures, reduce-image-size, image-optimize Requires at least: 5.0 -Tested up to: 6.3.2 -Stable tag: 1.5.3 +Tested up to: 6.4.3 +Stable tag: 1.5.5 License: GPLv3 License URI: http://www.gnu.org/licenses/gpl.html @@ -147,6 +147,16 @@ Yes, you can. However you need to edit manually the config.php as of this writin == Changelog == +##### Version 1.5.5 + +- Tested up to WordPress 6.4.3 +- Support more images + +##### Version 1.5.4 + +- Tested up to WordPress 6.4.1 +- Fixed bug in plugin deactivation feedback + ##### Version 1.5.3 - Added deactivation feedback