Changeset 3447061
- Timestamp:
- 01/26/2026 12:01:50 PM (2 months ago)
- Location:
- staticdelivr
- Files:
-
- 6 edited
- 1 copied
-
tags/2.4.0 (copied) (copied from staticdelivr/trunk)
-
tags/2.4.0/README.txt (modified) (2 diffs)
-
tags/2.4.0/includes/class-staticdelivr-images.php (modified) (1 diff)
-
tags/2.4.0/staticdelivr.php (modified) (2 diffs)
-
trunk/README.txt (modified) (2 diffs)
-
trunk/includes/class-staticdelivr-images.php (modified) (1 diff)
-
trunk/staticdelivr.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
staticdelivr/tags/2.4.0/README.txt
r3446608 r3447061 240 240 == Changelog == 241 241 242 = 2.4.0 = 243 * New: Smart Dimension Detection. The plugin now automatically identifies missing width and height attributes for WordPress images and restores them using attachment metadata. 244 * Improved: Resolves Google PageSpeed Insights warnings regarding "Explicit width and height" for image elements. 245 * Improved: Enhances Cumulative Layout Shift (CLS) scores by ensuring browsers reserve the correct aspect ratio during image loading. 246 * Improved: Synchronized CDN URL optimization parameters with detected database dimensions for more accurate image scaling. 247 242 248 = 2.3.0 = 243 249 * Major Improvement: Significant performance boost by removing blocking DNS lookups during image processing. … … 397 403 == Upgrade Notice == 398 404 405 = 2.4.0 = 406 This update introduces Smart Dimension Detection to automatically fix PageSpeed Insights warnings and improve your site's SEO and CLS scores. Highly recommended for all users. 407 399 408 = 2.3.0 = 400 409 This major update introduces significant performance optimizations and critical stability fixes for thumbnail generation and HTML parsing. Upgrading is highly recommended for a faster and more stable site experience. -
staticdelivr/tags/2.4.0/includes/class-staticdelivr-images.php
r3446608 r3447061 299 299 $height = preg_match( '/height=["\']?(\d+)/i', $img_tag, $h_match ) ? (int)$h_match[1] : null; 300 300 301 // Smart Attribute Injection: If dimensions are missing, try to find them via the WP ID class 302 if ( ( ! $width || ! $height ) && preg_match( '/wp-image-([0-9]+)/i', $img_tag, $id_match ) ) { 303 $attachment_id = (int) $id_match[1]; 304 $meta = wp_get_attachment_metadata( $attachment_id ); 305 306 if ( $meta ) { 307 if ( ! $width && ! empty( $meta['width'] ) ) { 308 $width = $meta['width']; 309 $img_tag = str_replace( '<img', '<img width="' . esc_attr( $width ) . '"', $img_tag ); 310 } 311 if ( ! $height && ! empty( $meta['height'] ) ) { 312 $height = $meta['height']; 313 $img_tag = str_replace( '<img', '<img height="' . esc_attr( $height ) . '"', $img_tag ); 314 } 315 } 316 } 317 301 318 return preg_replace_callback( 302 319 '/src=["\']([^"\']+)["\']/i', -
staticdelivr/tags/2.4.0/staticdelivr.php
r3446608 r3447061 3 3 * Plugin Name: StaticDelivr CDN 4 4 * Description: Speed up your WordPress site with free CDN delivery and automatic image optimization. Reduces load times and bandwidth costs. 5 * Version: 2. 3.05 * Version: 2.4.0 6 6 * Requires at least: 5.8 7 7 * Requires PHP: 7.4 … … 21 21 // Define plugin constants. 22 22 if (!defined('STATICDELIVR_VERSION')) { 23 define('STATICDELIVR_VERSION', '2. 3.0');23 define('STATICDELIVR_VERSION', '2.4.0'); 24 24 } 25 25 if (!defined('STATICDELIVR_PLUGIN_FILE')) { -
staticdelivr/trunk/README.txt
r3446608 r3447061 240 240 == Changelog == 241 241 242 = 2.4.0 = 243 * New: Smart Dimension Detection. The plugin now automatically identifies missing width and height attributes for WordPress images and restores them using attachment metadata. 244 * Improved: Resolves Google PageSpeed Insights warnings regarding "Explicit width and height" for image elements. 245 * Improved: Enhances Cumulative Layout Shift (CLS) scores by ensuring browsers reserve the correct aspect ratio during image loading. 246 * Improved: Synchronized CDN URL optimization parameters with detected database dimensions for more accurate image scaling. 247 242 248 = 2.3.0 = 243 249 * Major Improvement: Significant performance boost by removing blocking DNS lookups during image processing. … … 397 403 == Upgrade Notice == 398 404 405 = 2.4.0 = 406 This update introduces Smart Dimension Detection to automatically fix PageSpeed Insights warnings and improve your site's SEO and CLS scores. Highly recommended for all users. 407 399 408 = 2.3.0 = 400 409 This major update introduces significant performance optimizations and critical stability fixes for thumbnail generation and HTML parsing. Upgrading is highly recommended for a faster and more stable site experience. -
staticdelivr/trunk/includes/class-staticdelivr-images.php
r3446608 r3447061 299 299 $height = preg_match( '/height=["\']?(\d+)/i', $img_tag, $h_match ) ? (int)$h_match[1] : null; 300 300 301 // Smart Attribute Injection: If dimensions are missing, try to find them via the WP ID class 302 if ( ( ! $width || ! $height ) && preg_match( '/wp-image-([0-9]+)/i', $img_tag, $id_match ) ) { 303 $attachment_id = (int) $id_match[1]; 304 $meta = wp_get_attachment_metadata( $attachment_id ); 305 306 if ( $meta ) { 307 if ( ! $width && ! empty( $meta['width'] ) ) { 308 $width = $meta['width']; 309 $img_tag = str_replace( '<img', '<img width="' . esc_attr( $width ) . '"', $img_tag ); 310 } 311 if ( ! $height && ! empty( $meta['height'] ) ) { 312 $height = $meta['height']; 313 $img_tag = str_replace( '<img', '<img height="' . esc_attr( $height ) . '"', $img_tag ); 314 } 315 } 316 } 317 301 318 return preg_replace_callback( 302 319 '/src=["\']([^"\']+)["\']/i', -
staticdelivr/trunk/staticdelivr.php
r3446608 r3447061 3 3 * Plugin Name: StaticDelivr CDN 4 4 * Description: Speed up your WordPress site with free CDN delivery and automatic image optimization. Reduces load times and bandwidth costs. 5 * Version: 2. 3.05 * Version: 2.4.0 6 6 * Requires at least: 5.8 7 7 * Requires PHP: 7.4 … … 21 21 // Define plugin constants. 22 22 if (!defined('STATICDELIVR_VERSION')) { 23 define('STATICDELIVR_VERSION', '2. 3.0');23 define('STATICDELIVR_VERSION', '2.4.0'); 24 24 } 25 25 if (!defined('STATICDELIVR_PLUGIN_FILE')) {
Note: See TracChangeset
for help on using the changeset viewer.