Plugin Directory

Changeset 2774846


Ignore:
Timestamp:
08/24/2022 11:35:12 AM (4 years ago)
Author:
seenthis
Message:

Removed ccs imported imgs

Location:
greenweb/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • greenweb/trunk/README.txt

    r2743511 r2774846  
    7979== Changelog ==
    8080
     81= 1.1.2 =
     82* Bugfix: Css backgrounds images removed from altering url
     83
    8184= 1.1.1 =
    8285* Bugfix: If there is no prefix or wrong/failing prefix the plugin will not alter the src of image.
  • greenweb/trunk/apart.php

    r2743511 r2774846  
    1313 * Plugin URI:        seenthis.co
    1414 * Description:       APART reduces your site’s carbon footprint and improves user experience by reducing its image data transfer and improving image load times.
    15  * Version:           1.1.1
     15 * Version:           1.1.2
    1616 * Author:            Seenthis
    1717 * Author URI:        https://www.seenthis.co
     
    183183            global $optiUrl;
    184184            $images = $document->getElementsByTagName('img');
    185            
     185
    186186            foreach ($images as $img) {   
    187187                $srcset = $img->getAttribute('srcset');
    188188                $src = $img->getAttribute('src');
    189                 $img->setAttribute('src', $optiUrl . $src);
    190                 if ($srcset) {
    191                     global $replace;
    192                     $img->setAttribute('srcset', strtr($srcset, $replace));
     189                $style = $img->getAttribute('style');
     190
     191                if(!strpos($style, 'background-image:')) {
     192                    $img->setAttribute('src', $optiUrl . $src);
     193                   
     194                    if ($srcset) {
     195                        global $replace;
     196                        $img->setAttribute('srcset', strtr($srcset, $replace));
     197                    };
    193198                }
    194199            }   
  • greenweb/trunk/greenweb_globals.php

    r2743511 r2774846  
    99const baseName = 'apart';
    1010const rootFolder = 'greenweb';
    11 const version = '1.1.1';
     11const version = '1.1.2';
    1212
    1313class greenweb_settings{
Note: See TracChangeset for help on using the changeset viewer.