]> _ Git - cubeextranet.git/commitdiff
wip #5535
authorvincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 10 Nov 2022 09:41:13 +0000 (09:41 +0000)
committervincent@cubedesigners.com <vincent@cubedesigners.com@f5622870-0f3c-0410-866d-9cb505b7a8ef>
Thu, 10 Nov 2022 09:41:13 +0000 (09:41 +0000)
inc/ws/Util/html5/master/class.ws.html5.compiler.php

index b358c596afa2937324e5b5d7f19276f0934fb720..b109b9479d6f8a3040935bf31b1c0b3bc47cba60 100644 (file)
@@ -706,7 +706,8 @@ class wsHTML5Compiler
         $this->_commonPuma();
     }
 
-    protected function _commonPuma(){
+    protected function _commonPuma()
+    {
         $this->addJsLib('parsley', 'js/libs/parsley.min.js');
         $this->addJsLib('cookie', 'js/libs/jquery/jquery.cookie.js');
 
@@ -741,8 +742,10 @@ class wsHTML5Compiler
                 if ($fname !== '') {
                     $fname = str_replace(' ', '-', $fname);
                     $wfile = $this->wdir . 'commerce/' . $fname;
+
                     if (file_exists($wfile)) {
-                        $fname = 'data/commerce/' . $fname;
+                        $s = getimagesize($wfile);
+                        $fname = '<img src="data/commerce/' . $fname . '" style="background:white;" data-width="' . $s[0] . '" data-height="' . $s[1] . '" />';
                         $this->vdir->copy($wfile, $fname);
                     } else {
                         $fname = '';
@@ -3864,7 +3867,7 @@ height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
             $legend = (string)$child;
             $caption = $legend ? '<figcaption>' . $legend . '</figcaption>' : '';
             if (file_exists($filepath)) {
-                $dim = getimagesize($filepath);
+                $dim = CubeIT_Image::getimagesize($filepath);
             } else {
                 $dim = [0 => 1024, 1 => 10];
             }