Plugin Directory

Changeset 2961967


Ignore:
Timestamp:
09/02/2023 01:14:09 PM (3 years ago)
Author:
easywpstuff
Message:

readme.txt updated

Location:
easy-optimizer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • easy-optimizer/tags/1.0.8/easy-optimizer.php

    r2961962 r2961967  
    217217                // Check if the img tag is among the first excluded images
    218218                $is_first_excluded_image = ( $image_index < $exclude_first );
    219 
    220                 if ( ! $is_excluded && ! $is_first_excluded_image ) {
    221                     // Check if the img tag has srcset
    222                     $has_srcset = $img->hasAttribute( 'srcset' );
    223                     $imgwidth  = $img->getAttribute( 'width' );
    224                     $imgheight = $img->getAttribute( 'height' );
    225                     if (empty($imgwidth) && empty($imgheight)) {
     219                $imgwidth  = $img->getAttribute( 'width' );
     220                $imgheight = $img->getAttribute( 'height' );
     221                if (empty($imgwidth) && empty($imgheight)) {
    226222                        $src = $img->getAttribute('src');
    227223                        list($width, $height) = getimagesize($src);
     
    230226                            $img->setAttribute('height', $height);
    231227                        }
    232                     }
     228                }
     229
     230                if ( ! $is_excluded && ! $is_first_excluded_image ) {
     231                    // Check if the img tag has srcset
     232                    $has_srcset = $img->hasAttribute( 'srcset' );
     233                   
    233234                    if (!empty($width) && !empty($height)) {
    234235                    $placeholder = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 $width $height'%3E%3C/svg%3E";
  • easy-optimizer/trunk/easy-optimizer.php

    r2961962 r2961967  
    217217                // Check if the img tag is among the first excluded images
    218218                $is_first_excluded_image = ( $image_index < $exclude_first );
    219 
    220                 if ( ! $is_excluded && ! $is_first_excluded_image ) {
    221                     // Check if the img tag has srcset
    222                     $has_srcset = $img->hasAttribute( 'srcset' );
    223                     $imgwidth  = $img->getAttribute( 'width' );
    224                     $imgheight = $img->getAttribute( 'height' );
    225                     if (empty($imgwidth) && empty($imgheight)) {
     219                $imgwidth  = $img->getAttribute( 'width' );
     220                $imgheight = $img->getAttribute( 'height' );
     221                if (empty($imgwidth) && empty($imgheight)) {
    226222                        $src = $img->getAttribute('src');
    227223                        list($width, $height) = getimagesize($src);
     
    230226                            $img->setAttribute('height', $height);
    231227                        }
    232                     }
     228                }
     229
     230                if ( ! $is_excluded && ! $is_first_excluded_image ) {
     231                    // Check if the img tag has srcset
     232                    $has_srcset = $img->hasAttribute( 'srcset' );
     233                   
    233234                    if (!empty($width) && !empty($height)) {
    234235                    $placeholder = "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 $width $height'%3E%3C/svg%3E";
Note: See TracChangeset for help on using the changeset viewer.