{"id":689,"date":"2021-07-05T14:02:18","date_gmt":"2021-07-05T13:02:18","guid":{"rendered":"https:\/\/www.graphicz.co.uk\/blog\/?p=689"},"modified":"2021-07-05T14:08:08","modified_gmt":"2021-07-05T13:08:08","slug":"serving-scaled-images-resizing-images","status":"publish","type":"post","link":"https:\/\/www.graphicz.co.uk\/blog\/serving-scaled-images-resizing-images\/","title":{"rendered":"Serving Scaled Images &#8211; Resizing images"},"content":{"rendered":"\n<p>In July 2020 I wrote about resizing images using a php script called Simple Image (<a href=\"https:\/\/community.sellerdeck.com\/forum\/sellerdeck-ecommerce-software\/sellerdeck-desktop-v18\/552425-page-load-times?p=552830#post552830\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/community.sellerdeck.com\/forum\/sellerdeck-ecommerce-software\/sellerdeck-desktop-v18\/552425-page-load-times?p=552830#post552830<\/a>)<br><br>I have been developing the concept and along with some valuable input from Norman Rouxell of <a href=\"https:\/\/drillpine.biz\" target=\"_blank\" rel=\"noreferrer noopener\">drillpine.biz<\/a> regarding using the script with a Bootstrap site (Swift for example) am now using the following way of serving scaled images appropriate to viewport. It also gives the appropriate width and height for each image which also helps SEO.<br><br>You need to download the simpleImage.php script from <a href=\"https:\/\/github.com\/claviska\/SimpleImage\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/github.com\/claviska\/SimpleImage<\/a><br><br>Please note, this is now version 3.6.3 and it differs from earlier versions in having the line<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>namespace claviska;<\/code><\/pre>\n\n\n\n<p>So that when the script is called you need to use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$image = new \\claviska\\SimpleImage();<\/code><\/pre>\n\n\n\n<p>and not as previously:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>$image = new SimpleImage();<\/code><\/pre>\n\n\n\n<p>You need to create a folder in the Site folder called &#8216;scaled&#8217;.<br><br>The layouts that are modified are as follows:<br><br><strong>Before you start take a site snapshot!<\/strong><br><br>Then copy these layouts in the design library so you have backups:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Best Seller<\/li><li>Home Page Section List<\/li><li>New Product<\/li><li>Product Summary Image<\/li><li>Standard Product Image<\/li><li>Standard Promotional List Entry<\/li><li>Top Level Section<\/li><\/ul>\n\n\n\n<p>Here are the layouts<br><br><strong>Best Seller &#8211; Simple Image Revised July 2021<\/strong><br><strong><br>Compact Best Seller Layout<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>]&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageFileName%22%20%2f%3e%20%21%3d%20%22%22\" &gt;\n&lt;actinic:block php=\"true\" &gt;\ninclude_once 'simpleImage.php';\nerror_reporting(E_ALL &amp; ~E_NOTICE);\n$altname = '&lt;actinic:variable name=\"ProductName\" encoding=\"perl\" selectable=\"false\" \/&gt; image';\n$sOrigimagebs = str_replace('\\\\','\/', '&lt;actinic:variable name=\"ProductImageFileName\" encoding=\"perl\" selectable=\"false\" \/&gt;');\n$scaleddir = 'scaled\/';\n$simpleimagebase = basename($sOrigimagebs);\n$bslgwidth = 230;\n$bsmdwidth = 495;\n$bssmwidth = 767;\n$bsxswidth = 576;\n$bslgfile = $scaleddir . 'bslg_' . $simpleimagebase;\n$bsmdfile = $scaleddir . 'bsmd_' . $simpleimagebase;\n$bssmfile = $scaleddir . 'bssm_' . $simpleimagebase;\n$bsxsfile = $scaleddir . 'bsxs_' . $simpleimagebase;\nif ( file_exists($sOrigimagebs) )\n{\n$bslgheight = ($bslgwidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n$bsmdheight = ($bsmdwidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n$bssmheight = ($bssmwidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n$bsxsheight = ($bsxswidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n}\ntry\n{\nif ( file_exists($sOrigimagebs) )\n{\n$simpleimagebsl = new \\claviska\\SimpleImage($sOrigimagebs);\n$simpleimagebsl -&gt; resize($bslgwidth) -&gt; toFile($bslgfile);\n$simpleimagebsl -&gt; resize($bsmdwidth) -&gt; toFile($bsmdfile);\n$simpleimagebsl -&gt; resize($bssmwidth) -&gt; toFile($bssmfile);\n$simpleimagebsl -&gt; resize($bsxswidth) -&gt; toFile($bsxsfile);\n}\n}\ncatch(Exception $err)\n{\n\/\/ Handle errors\necho $err-&gt;getMessage();\n}\n&lt;\/actinic:block&gt;\n&lt;\/actinic:block&gt;\n\n&lt;div class=\"image\"&gt;\n&lt;a class=\"d-flex align-items-center justify-content-center overflow-hidden\" href=\"&lt;actinic:variable name=\"SearchCGIURL\" \/&gt;?PRODREF=&lt;actinic:variable name=\"ProductID\" \/&gt;&amp;amp;NOLOGIN=1&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e\" &gt;&amp;amp;SHOP=&lt;actinic:variable name=\"ShopID\" \/&gt;&lt;\/actinic:block&gt;\"&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageFileName%22%20%2f%3e%20%21%3d%20%22%22\" &gt;\n&lt;img class=\"d-none d-lg-block lazyload lazy img-responsive\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$bslgfile\\\" data-src=\\\"$bslgfile\\\" alt=\\\"$altname\\\" width=\\\"$bslgwidth\\\" height=\\\"$bslgheight\\\"\";&lt;\/actinic:block&gt; title=\"&lt;actinic:variable encoding=\"strip\" name=\"ProductName\" \/&gt;\" &gt;\n&lt;img class=\"d-none d-md-block d-lg-none lazyload lazy img-responsive\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$bsmdfile\\\" data-src=\\\"$bsmdfile\\\" alt=\\\"$altname\\\" width=\\\"$bsmdwidth\\\" height=\\\"$bsmdheight\\\"\";&lt;\/actinic:block&gt; title=\"&lt;actinic:variable encoding=\"strip\" name=\"ProductName\" \/&gt;\" &gt;\n&lt;img class=\"d-none d-sm-block d-md-none lazyload lazy img-responsive\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$bssmfile\\\" data-src=\\\"$bssmmfile\\\" alt=\\\"$altname\\\" width=\\\"$bssmwidth\\\" height=\\\"$bssmheight\\\"\";&lt;\/actinic:block&gt; title=\"&lt;actinic:variable encoding=\"strip\" name=\"ProductName\" \/&gt;\" &gt;\n&lt;img class=\"d-block d-sm-none lazyload lazy img-responsive\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$bsxsfile\\\" data-src=\\\"$bsxsfile\\\" alt=\\\"$altname\\\" width=\\\"$bsxswidth\\\" height=\\\"$bsxsheight\\\"\";&lt;\/actinic:block&gt; title=\"&lt;actinic:variable encoding=\"strip\" name=\"ProductName\" \/&gt;\" &gt;\n&lt;\/actinic:block&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageFileName%22%20%2f%3e%20%3d%3d%20%22%22\" &gt;\n&lt;img class=\"lazyload lazy img-responsive\" data-src=\"&lt;actinic:variable name=\"DefaultProductImage\" \/&gt;\" src=\"&lt;actinic:variable name=\"DefaultProductImage\" \/&gt;\" \/&gt;\n&lt;\/actinic:block&gt;\n&lt;\/a&gt;\n&lt;\/div&gt;\n&lt;div class=\"caption\"&gt;\n&lt;a class=\"product-name\" href=\"&lt;actinic:variable name=\"SearchCGIURL\" \/&gt;?PRODREF=&lt;actinic:variable encoding=\"url\" name=\"ProductID\" \/&gt;&amp;amp;NOLOGIN=1&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e\" &gt;&amp;amp;SHOP=&lt;actinic:variable name=\"ShopID\" \/&gt;&lt;\/actinic:block&gt;\"&gt;&lt;span&gt;&lt;actinic:variable name=\"ProductName\" \/&gt;&lt;\/span&gt;&lt;\/a&gt;\n&lt;div class=\"col-12\"&gt;\n&lt;div class=\"product-price-sec\"&gt;\n&lt;Actinic:PRICES PROD_REF=\"&lt;actinic:variable name=\"ProductID\" \/&gt;\" RETAIL_PRICE_PROMPT=\"&lt;actinic:variable name=\"ProductPriceDescription\" \/&gt;\"&gt;\n&lt;actinic:variable name=\"PriceListRetail\" value=\"Marketing Price List\" \/&gt;\n&lt;\/Actinic:PRICES&gt;\n&lt;\/div&gt;\n&lt;\/div&gt;\n&lt;\/div&gt;\n&lt;p class=\"product-info\"&gt;\n&lt;a class=\"add-to-cart-btn\" href=\"&lt;actinic:variable name=\"SearchCGIURL\" \/&gt;?PRODREF=&lt;actinic:variable encoding=\"url\" name=\"ProductID\" \/&gt;&amp;amp;NOLOGIN=1&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e\" &gt;&amp;amp;SHOP=&lt;actinic:variable name=\"ShopID\" \/&gt;&lt;\/actinic:block&gt;\"&gt;\n&lt;img src=\"cart-icon-w.png\" class=\"cartIcon\" alt=\"\"&gt;\n&lt;\/a&gt;\n&lt;\/p&gt;\n<\/code><\/pre>\n\n\n\n<p><strong>Home Page Section List &#8211; Simple Image Revised July 2021<\/strong><br><br>From :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div class=\"image\"&gt;<\/code><\/pre>\n\n\n\n<p>To :<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div class=\"caption\"&gt;\n&lt;a class=\"text-center product-title\" href=\"&lt;actinic:variable name=\"SectionURL\" \/&gt;\"&gt;&lt;actinic:variable name=\"SectionName\" \/&gt;&lt;\/a&gt;\n&lt;\/div&gt;\n&lt;\/div&gt;<\/code><\/pre>\n\n\n\n<p>Inclusive<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;div class=\"image\"&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22SectionImageFileName%22%20%2f%3e%20%21%3d%20%22%22\"&gt;\n&lt;actinic:block php=\"true\" &gt;\ninclude_once 'SimpleImage.php';\nerror_reporting(E_ALL &amp; ~E_NOTICE);\n$altname = '&lt;actinic:variable name=\"SectionName\" encoding=\"perl\" selectable=\"false\" \/&gt; image';\n$sOrigimagehps = str_replace('\\\\','\/', '&lt;actinic:variable name=\"SectionImageFileName\" encoding=\"perl\" selectable=\"false\" \/&gt;');\n$scaleddir = 'scaled\/';\n$simpleimagebasehps = basename($sOrigimagehps);\n$hpsxlgwidth = 240;\n$hpsxmdwidth = 500;\n$hpsxsmwidth = 770;\n$hpsxxswidth = 580;\n$hpsxlgfile = $scaleddir . 'hpsxlg_' . $simpleimagebasehps;\n$hpsxmdfile = $scaleddir . 'hpsxmd_' . $simpleimagebasehps;\n$hpsxsmfile = $scaleddir . 'hpsxsm_' . $simpleimagebasehps;\n$hpsxxsfile = $scaleddir . 'hpsxxs_' . $simpleimagebasehps;\nif ( file_exists($sOrigimagehps) )\n{\n$hpsxlgheight = ($hpsxlgwidth*(&lt;actinic:variable encoding=\"perl\" name=\"SectionImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"SectionImageWidth\" selectable=\"false\" \/&gt;)) ;\n$hpsxmdheight = ($hpsxmdwidth*(&lt;actinic:variable encoding=\"perl\" name=\"SectionImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"SectionImageWidth\" selectable=\"false\" \/&gt;)) ;\n$hpsxsmheight = ($hpsxsmwidth*(&lt;actinic:variable encoding=\"perl\" name=\"SectionImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"SectionImageWidth\" selectable=\"false\" \/&gt;)) ;\n$hpsxxsheight = ($hpsxxswidth*(&lt;actinic:variable encoding=\"perl\" name=\"SectionImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"SectionImageWidth\" selectable=\"false\" \/&gt;)) ;\n}\ntry\n{\nif ( file_exists($sOrigimagehps) )\n{\n$simpleimagehps = new \\claviska\\SimpleImage($sOrigimagehps);\n$simpleimagehps -&gt; resize($hpsxlgwidth) -&gt; toFile($hpsxlgfile);\n$simpleimagehps -&gt; resize($hpsxmdwidth) -&gt; toFile($hpsxmdfile);\n$simpleimagehps -&gt; resize($hpsxsmwidth) -&gt; toFile($hpsxsmfile);\n$simpleimagehps -&gt; resize($hpsxxswidth) -&gt; toFile($hpsxxsfile);\n}\n}\ncatch(Exception $err)\n{\n\/\/ Handle errors\necho $err-&gt;getMessage();\n}\n&lt;\/actinic:block&gt;\n&lt;\/actinic:block&gt;\n&lt;a href=&lt;actinic:variable name=\"SectionURL\" \/&gt;\" class=\"text-center align-items-center d-flex image-link\"&gt;\n&lt;img src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$hpsxlgfile\\\" data-src=\\\"$hpsxlgfile\\\" alt=\\\"$altname\\\" width=\\\"$hpsxlgwidth\\\" height=\\\"$hpsxlgheight\\\"\";&lt;\/actinic:block&gt; class=\"d-none d-lg-block lazy lazyload img-responsive product-summary-image ml-auto mr-auto\"\/&gt;\n&lt;img src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$hpsxmdfile\\\" data-src=\\\"$hpsxmdfile\\\" alt=\\\"$altname\\\" width=\\\"$hpsxmdwidth\\\" height=\\\"$hpsxmdheight\\\"\";&lt;\/actinic:block&gt; class=\"d-none d-md-block d-lg-none lazy lazyload img-responsive product-summary-image ml-auto mr-auto\"\/&gt;\n&lt;img src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$hpsxsmfile\\\" data-src=\\\"$hpsxsmfile\\\" alt=\\\"$altname\\\" width=\\\"$hpsxsmwidth\\\" height=\\\"$hpsxsmheight\\\"\";&lt;\/actinic:block&gt; class=\"d-none d-sm-block d-md-none lazy lazyload img-responsive product-summary-image ml-auto mr-auto\"\/&gt;\n&lt;img src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$hpsxxsfile\\\" data-src=\\\"$hpsxxsfile\\\" alt=\\\"$altname\\\" width=\\\"$hpsxxswidth\\\" height=\\\"$hpsxxsheight\\\"\";&lt;\/actinic:block&gt; class=\"d-block d-sm-none lazy lazyload img-responsive product-summary-image ml-auto mr-auto\"\/&gt;\n&lt;\/a&gt;\n&lt;div class=\"caption\"&gt;\n&lt;a class=\"text-center product-title\" href=\"&lt;actinic:variable name=\"SectionURL\" \/&gt;\"&gt;&lt;actinic:variable name=\"SectionName\" \/&gt;&lt;\/a&gt;\n&lt;\/div&gt;\n&lt;\/div&gt;\n<\/code><\/pre>\n\n\n\n<p><strong>New Product &#8211; Simple Image Revised July 2021<br><br>Compact New Products Item<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>]&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageFileName%22%20%2f%3e%20%21%3d%20%22%22\" &gt;\n&lt;actinic:block php=\"true\" &gt;\ninclude_once 'simpleImage.php';\nerror_reporting(E_ALL &amp; ~E_NOTICE);\n$altname = '&lt;actinic:variable name=\"ProductName\" encoding=\"perl\" selectable=\"false\" \/&gt; image';\n$sOrigimagenp = str_replace('\\\\','\/', '&lt;actinic:variable name=\"ProductImageFileName\" encoding=\"perl\" selectable=\"false\" \/&gt;');\n$scaleddir = 'scaled\/';\n$simpleimagebase = basename($sOrigimagenp);\n$nplgwidth = 240;\n$npmdwidth = 500;\n$npsmwidth = 770;\n$npxswidth = 580;\n\n$nplgfile = $scaleddir . 'nplg_' . $simpleimagebase;\n$npmdfile = $scaleddir . 'npmd_' . $simpleimagebase;\n$npsmfile = $scaleddir . 'npsm_' . $simpleimagebase;\n$npxsfile = $scaleddir . 'npxs_' . $simpleimagebase;\nif ( file_exists($sOrigimagenp) )\n{\n$nplgheight = ($nplgwidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n$npmdheight = ($npmdwidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n$npsmheight = ($npsmwidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n$npxsheight = ($npxswidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n}\ntry\n{\nif ( file_exists($sOrigimagenp) )\n{\n$simpleimagenpl = new \\claviska\\SimpleImage($sOrigimagenp);\n$simpleimagenpl -&gt; resize($nplgwidth) -&gt; toFile($nplgfile);\n$simpleimagenpl -&gt; resize($npmdwidth) -&gt; toFile($npmdfile);\n$simpleimagenpl -&gt; resize($npsmwidth) -&gt; toFile($npsmfile);\n$simpleimagenpl -&gt; resize($npxswidth) -&gt; toFile($npxsfile);\n}\n}\ncatch(Exception $err)\n{\n\/\/ Handle errors\necho $err-&gt;getMessage();\n}\n&lt;\/actinic:block&gt;\n&lt;\/actinic:block&gt;\n\n\n&lt;div class=\"image\"&gt;\n&lt;a class=\"d-flex align-items-center justify-content-center overflow-hidden\" href=\"&lt;actinic:variable name=\"SearchCGIURL\" \/&gt;?PRODREF=&lt;actinic:variable name=\"ProductID\" \/&gt;&amp;amp;NOLOGIN=1&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e\" &gt;&amp;amp;SHOP=&lt;actinic:variable name=\"ShopID\" \/&gt;&lt;\/actinic:block&gt;\"&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageFileName%22%20%2f%3e%20%21%3d%20%22%22\" &gt;\n&lt;img class=\"d-none d-lg-block lazyload lazy img-responsive\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$nplgfile\\\" data-src=\\\"$nplgfile\\\" alt=\\\"$altname\\\" width=\\\"$nplgwidth\\\" height=\\\"$nplgheight\\\"\";&lt;\/actinic:block&gt; title=\"&lt;actinic:variable encoding=\"strip\" name=\"ProductName\" \/&gt;\" &gt;\n&lt;img class=\"d-none d-md-block d-lg-none lazyload lazy img-responsive\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$npmdfile\\\" data-src=\\\"$npmdfile\\\" alt=\\\"$altname\\\" width=\\\"$npmdwidth\\\" height=\\\"$npmdheight\\\"\";&lt;\/actinic:block&gt; title=\"&lt;actinic:variable encoding=\"strip\" name=\"ProductName\" \/&gt;\" &gt;\n&lt;img class=\"d-none d-sm-block d-md-none lazyload lazy img-responsive\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$npsmfile\\\" data-src=\\\"$npsmfile\\\" alt=\\\"$altname\\\" width=\\\"$npsmwidth\\\" height=\\\"$npsmheight\\\"\";&lt;\/actinic:block&gt; title=\"&lt;actinic:variable encoding=\"strip\" name=\"ProductName\" \/&gt;\" &gt;\n&lt;img class=\"d-block d-sm-none lazyload lazy img-responsive\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$npxsfile\\\" data-src=\\\"$npxsfile\\\" alt=\\\"$altname\\\" width=\\\"$npxswidth\\\" height=\\\"$npxsheight\\\"\";&lt;\/actinic:block&gt; title=\"&lt;actinic:variable encoding=\"strip\" name=\"ProductName\" \/&gt;\" &gt;\n&lt;\/actinic:block&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageFileName%22%20%2f%3e%20%3d%3d%20%22%22\" &gt;\n&lt;img src=\"&lt;actinic:variable name=\"DefaultProductImage\" \/&gt;\" class=\"lazyload lazy img-responsive\" data-src=\"&lt;actinic:variable name=\"DefaultProductImage\" \/&gt;\" title=\"&lt;actinic:variable encoding=\"strip\" name=\"ProductName\" \/&gt;\"&gt;\n&lt;\/actinic:block&gt;\n&lt;\/a&gt;\n&lt;\/div&gt;\n&lt;div class=\"caption\"&gt;\n&lt;a class=\"product-name\" href=\"&lt;actinic:variable name=\"SearchCGIURL\" \/&gt;?PRODREF=&lt;actinic:variable encoding=\"url\" name=\"ProductID\" \/&gt;&amp;amp;NOLOGIN=1&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e\" &gt;&amp;amp;SHOP=&lt;actinic:variable name=\"ShopID\" \/&gt;&lt;\/actinic:block&gt;\"&gt;\n&lt;span&gt;&lt;actinic:variable name=\"ProductName\" \/&gt;&lt;\/span&gt;\n&lt;\/a&gt;\n&lt;div class=\"col-12\"&gt;\n&lt;div class=\"product-price-sec\"&gt;\n&lt;Actinic:PRICES PROD_REF=\"&lt;actinic:variable name=\"ProductID\" \/&gt;\" RETAIL_PRICE_PROMPT=\"&lt;actinic:variable name=\"ProductPriceDescription\" \/&gt;\"&gt;\n&lt;actinic:variable name=\"PriceListRetail\" value=\"Standard Retail Price List\" \/&gt;\n&lt;\/Actinic:PRICES&gt;\n&lt;\/div&gt;\n&lt;\/div&gt;\n&lt;\/div&gt;\n&lt;p class=\"product-info\"&gt;\n&lt;a class=\"add-to-cart-btn\" href=\"&lt;actinic:variable name=\"SearchCGIURL\" \/&gt;?PRODREF=&lt;actinic:variable encoding=\"url\" name=\"ProductID\" \/&gt;&amp;amp;NOLOGIN=1&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsHostMode%22%20%2f%3e\" &gt;&amp;amp;SHOP=&lt;actinic:variable name=\"ShopID\" \/&gt;&lt;\/actinic:block&gt;\"&gt;\n&lt;img src=\"cart-icon-w.png\" class=\"cartIcon\" alt=\"\"&gt;\n&lt;\/a&gt;\n&lt;\/p&gt;\n<\/code><\/pre>\n\n\n\n<p><strong>Product Summary Image &#8211; Simple Image Revised July 2021<br><br>&#8216;Small Product Image&#8217;<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>]&lt;actinic:block php=\"true\" &gt;\ninclude_once 'simpleImage.php';\nerror_reporting(E_ALL &amp; ~E_NOTICE);\n$altname = '&lt;actinic:variable name=\"ProductName\" encoding=\"perl\" selectable=\"false\" \/&gt; image';\n$sOrigimagespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt; = str_replace('\\\\','\/', '&lt;actinic:variable name=\"ProductImageFileName\" encoding=\"perl\" selectable=\"false\" \/&gt;');\n$scaleddir = 'scaled\/';\n$simpleimagebasespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt; = basename($sOrigimagespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;);\n$plgwidth = 267;\n$pmdwidth = 470;\n$psmwidth = 720;\n$pxswidth = 545;\n$plgfile = $scaleddir . 'plg_' . $simpleimagebasespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;;\n$pmdfile = $scaleddir . 'pmd_' . $simpleimagebasespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;;\n$psmfile = $scaleddir . 'psm_' . $simpleimagebasespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;;\n$pxsfile = $scaleddir . 'pxs_' . $simpleimagebasespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;;\nif ( file_exists($sOrigimagespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;) )\n{\n$plgheight = ($plgwidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n$pmdheight = ($pmdwidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n$psmheight = ($psmwidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n$pxsheight = ($pxswidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n}\ntry\n{\nif ( file_exists($sOrigimagespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;) )\n{\n$simpleimagespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt; = new \\claviska\\SimpleImage($sOrigimagespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;);\n$simpleimagespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt; -&gt; resize($plgwidth) -&gt; toFile($plgfile);\n$simpleimagespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt; -&gt; resize($pmdwidth) -&gt; toFile($pmdfile);\n$simpleimagespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt; -&gt; resize($psmwidth) -&gt; toFile($psmfile);\n$simpleimagespi&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt; -&gt; resize($pxswidth) -&gt; toFile($pxsfile);\n}\n}\ncatch(Exception $err)\n{\n\/\/ Handle errors\necho $err-&gt;getMessage();\n}\n&lt;\/actinic:block&gt;\n&lt;\/actinic:block&gt;\n\n&lt;div class=\"d-flex align-items-center justify-content-center w-100 product-image-sec\"&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsPopUpDisplayedByImage%22%20%2f%3e\" &gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ExtendedInformationType%22%20%2f%3e%20%3d%3d%20%22Opens%20in%20a%20Pop%2dUp%20Window%22\"&gt;\n&lt;a href=\"&lt;actinic:variable name=ExtendedInfoPageEncoded \/&gt;\" target=\"ActPopup\" onclick=\"return ShowPopUp('&lt;actinic:variable name=ExtendedInfoPageEncoded \/&gt;',&lt;actinic:variable name=\"ExtInfoWindowWidth\" \/&gt;,&lt;actinic:variable name=\"ExtInfoWindowHeight\" \/&gt;);\"&gt;\n&lt;\/actinic:block&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ExtendedInformationType%22%20%2f%3e%20%3d%3d%20%22Opens%20in%20the%20Same%20Window%22\" &gt;\n&lt;a href=\"&lt;actinic:variable name=\"ExtendedInfoPageName\" \/&gt;\"&gt;\n&lt;\/actinic:block&gt;\n&lt;\/actinic:block&gt;\n\n&lt;actinic:block if=\"%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22%29%20AND%20%28%3cactinic%3avariable%20name%3d%22ProductListImageLink%22%20%2f%3e%20%3d%3d%201%29\" &gt;&lt;a href=\"&lt;actinic:variable name=\"ProductPageName\" \/&gt;#SID=&lt;actinic:variable name=\"SectionID\" \/&gt;\"&gt;\n&lt;\/actinic:block&gt;\n\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e\"&gt;\n\n&lt;img src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$plgfile\\\" data-src=\\\"$plgfile\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\" width=\\\"$plgwidth\\\" height=\\\"$plgheight\\\"\";&lt;\/actinic:block&gt;\nid=\"im-&lt;Actinic:Variable Name=\"EncodedProductAnchor\" \/&gt;\"\nclass=\"d-none d-lg-block\" \/&gt;\n&lt;img src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$pmdfile\\\" data-src=\\\"$pmdfile\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\" width=\\\"$pmdwidth\\\" height=\\\"$pmdheight\\\"\";&lt;\/actinic:block&gt;\nid=\"im-&lt;Actinic:Variable Name=\"EncodedProductAnchor\" \/&gt;\"\nclass=\"d-none d-md-block d-lg-none\" \/&gt;\n&lt;img src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$psmfile\\\" data-src=\\\"$psmfile\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\" width=\\\"$psmwidth\\\" height=\\\"$psmheight\\\"\";&lt;\/actinic:block&gt;\nid=\"im-&lt;Actinic:Variable Name=\"EncodedProductAnchor\" \/&gt;\"\nclass=\"d-none d-sm-block d-md-none\" \/&gt;\n&lt;img src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$pxsfile\\\" data-src=\\\"$pxsfile\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\" width=\\\"$pxswidth\\\" height=\\\"$pxsheight\\\"\";&lt;\/actinic:block&gt;\nid=\"im-&lt;Actinic:Variable Name=\"EncodedProductAnchor\" \/&gt;\"\nclass=\"d-block d-sm-none\" \/&gt;\n&lt;\/actinic:block&gt;\n\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e%20%3d%3d%20False\"&gt;\n&lt;img src=\"&lt;actinic:variable name=\"DefaultProductImage\" \/&gt;\"\nborder=\"0\"\ntitle=\"&lt;actinic:variable name=\"ProductName\" encoding=\"strip\"\/&gt;\"\nalt=\"&lt;actinic:variable name=\"ProductName\" encoding=\"strip\"\/&gt;\" \/&gt;\n&lt;\/actinic:block&gt;\n\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsPopUpDisplayedByImage%22%20%2f%3e%20OR%0d%28%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22%29%20AND%20%0d%28%3cactinic%3avariable%20name%3d%22ProductListImageLink%22%20%2f%3e%20%3d%3d%201%29%29\" &gt;\n&lt;\/a&gt;\n&lt;\/actinic:block&gt;\n&lt;\/div&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e\"&gt;\n&lt;actinic:variable name=\"PinterestButtonLayout\" value=\"Product Pin It Button Layout\" \/&gt;\n&lt;\/actinic:block&gt;\n<\/code><\/pre>\n\n\n\n<p><br><\/p>\n\n\n\n<p><strong>Product Image &#8211; Simple Image Revised July 2021<br><br>&#8216;Standard Product Image&#8217;<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>]&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e\"&gt;\n&lt;actinic:block php=\"true\" &gt;\ninclude_once 'simpleImage.php';\nerror_reporting(E_ALL &amp; ~E_NOTICE);\n$altname = '&lt;actinic:variable name=\"ProductName\" encoding=\"perl\" selectable=\"false\" \/&gt; image';\n$sOrigimagepp&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt; = str_replace('\\\\','\/', '&lt;actinic:variable name=\"ProductImageFileName\" encoding=\"perl\" selectable=\"false\" \/&gt;');\n$scaleddir = 'scaled\/';\n$simpleimagebasepp&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt; = basename($sOrigimagepp&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;);\n$ppwidth = 400;\n$pprwidth = 740;\n$ppfile = $scaleddir . 'pp_' . $simpleimagebasepp&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;;\n$pprfile = $scaleddir . 'ppr_' . $simpleimagebasepp&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;;\nif ( file_exists($sOrigimagepp) )\n{\n$ppheight = ($ppwidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n$pprheight = ($pprwidth*(&lt;actinic:variable encoding=\"perl\" name=\"ProductImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"ProductImageWidth\" selectable=\"false\" \/&gt;)) ;\n}\ntry\n{\nif ( file_exists($sOrigimagepp&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;) )\n{\n$simpleimagepp&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt; = new \\claviska\\SimpleImage($sOrigimagepp&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;);\n$simpleimagepp&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt; -&gt; resize($ppwidth) -&gt; toFile($ppfile);\n$simpleimagepp&lt;actinic:variable encoding=\"perl\" name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt; -&gt; resize($pprwidth) -&gt; toFile($pprfile);\n}\n}\ncatch(Exception $err)\n{\n\/\/ Handle errors\necho $err-&gt;getMessage();\n}\n&lt;\/actinic:block&gt;\n&lt;\/actinic:block&gt;\n&lt;actinic:block if=\"%28%28%3cactinic%3avariable%20name%3d%22ZoomAutoIncludeMainImageWidth%22%20%2f%3e%20%3e%200%29%20%26%26%20%28%3cactinic%3avariable%20name%3d%22ProductImageWidth%22%20%2f%3e%20%3e%3d%20%3cactinic%3avariable%20name%3d%22ZoomAutoIncludeMainImageWidth%22%20%2f%3e%29%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage0%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage1%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage2%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage3%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage4%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage5%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage6%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage7%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage8%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage9%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage10%22%20%2f%3e%20%21%3d%20%22%22%29\" &gt;&lt;!-- Magic zoom prefix V3.14R --&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e%20%21%3d%20%22%22%20AND%0d%3cactinic%3avariable%20name%3d%22ProductImageWidth%22%20%2f%3e%20%3e%20%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e\" &gt;&lt;style&gt;.mzmaxwidth-&lt;actinic:variable name=\"ProductImageMaxWidth\" \/&gt;{max-width:&lt;actinic:variable name=\"ProductImageMaxWidth\" \/&gt;px !important;}&lt;\/style&gt;&lt;\/actinic:block&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ZoomIconsPosition%22%20%2f%3e%20%3d%3d%20%22top%22\" &gt;&lt;span class=\"mzp-ptab-icons-above\"&gt;&lt;actinic:variable name=\"MagicZoomImages\" value=\"Magic Zoom Image List Swift\" \/&gt;&lt;\/span&gt;&lt;br&gt;&lt;\/actinic:block&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ZoomIconsPosition%22%20%2f%3e%20%3d%3d%20%22left%22\" &gt;&lt;span class=\"mzp-ptab-icons-left\"&gt;&lt;actinic:variable name=\"MagicZoomImages\" value=\"Magic Zoom Image List Swift\" \/&gt;&lt;\/span&gt;&lt;\/p&gt;&lt;p class=\"product-image set-left\"&gt;&lt;\/actinic:block&gt;\n&lt;a href=\"&lt;actinic:variable name=\"MagicZoomImages\" value=\"Magic Zoom First Product Image Swift\" \/&gt;\"\nclass=\"MagicZoom\"\nid=\"mz-&lt;actinic:variable name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;\"\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ZoomResponsiveMaxScaleDown%22%20%2f%3e%20%3c%201\" &gt;\ndata-mzpimgw=\"&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e%20%3d%3d%20%22%22%20OR%0d%3cactinic%3avariable%20name%3d%22ProductImageWidth%22%20%2f%3e%20%3c%3d%20%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e\" &gt;&lt;actinic:variable name=\"ProductImageWidth\" \/&gt;&lt;\/actinic:block&gt;&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e%20%21%3d%20%22%22%20AND%0d%3cactinic%3avariable%20name%3d%22ProductImageWidth%22%20%2f%3e%20%3e%20%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e\" &gt;&lt;actinic:variable name=\"ProductImageMaxWidth\" \/&gt;&lt;\/actinic:block&gt;\"\ndata-mzpmaxs=\"&lt;actinic:variable name=\"ZoomResponsiveMaxScaleDown\" \/&gt;\"\ndata-mzpimgid = \"im-&lt;actinic:variable name=\"EncodedProductAnchor\" selectable=\"false\" \/&gt;\"\n&lt;\/actinic:block&gt;\ndata-options=\"zoomMode: &lt;actinic:variable name=\"ActionOnHover\" \/&gt;; expand: &lt;actinic:variable name=\"ActionOnClick\" \/&gt;; zoom-position:&lt;actinic:variable name=\"ZoomedImagePosition\" selectable=\"false\" \/&gt;;\n&lt;actinic:block php=\"true\"&gt;\n\/\/ Hotspots\n$zoomimages = array('&lt;actinic:variable name=\"ZoomImage0\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomImage1\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomImage2\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomImage3\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomImage4\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomImage5\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomImage6\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomImage7\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomImage8\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomImage9\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomImage10\" encoding=\"perl\" selectable=\"false\" \/&gt;');\n\n$iconalts = array('&lt;actinic:variable name=\"ZoomAlt0\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomAlt1\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomAlt2\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomAlt3\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomAlt4\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomAlt5\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomAlt6\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomAlt7\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomAlt8\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomAlt9\" encoding=\"perl\" selectable=\"false\" \/&gt;',\n'&lt;actinic:variable name=\"ZoomAlt10\" encoding=\"perl\" selectable=\"false\" \/&gt;');\n\/\/ see if there's anything to display\n$zoomimagecount = count($zoomimages);\n$hotspots = false;\n$coordpattern = '\/\\s*(\\d+)&#91;\\s,]+(\\d+)&#91;\\s,]+(\\d+)&#91;\\s,]+(\\d+)&#91;\\s,]*(.*)\/';\nfor ( $i=1; $i &lt; $zoomimagecount; $i++ )\n{\nif ( ($zoomimages&#91;$i] != '') &amp;&amp; preg_match($coordpattern, $iconalts&#91;$i]) )\n{\n$hotspots = true;\nbreak;\n}\n}\nif ( $hotspots ) echo \"hotspots: mzhot-&lt;actinic:variable name=\"EncodedProductAnchor\" encoding=\"perl\" selectable=\"false\" \/&gt;;\";\n&lt;\/actinic:block&gt;\nzoom-width: &lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ZoomedImagePosition%22%20%2f%3e%20%3d%3d%20%22inner%22\"&gt;&lt;actinic:variable name=\"ProductImageWidth\" selectable=\"false\" \/&gt;&lt;\/actinic:block&gt;&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ZoomedImagePosition%22%20%2f%3e%20%21%3d%20%22inner%22\" &gt;&lt;actinic:variable name=\"ZoomedImageWidth\" selectable=\"false\" \/&gt;&lt;\/actinic:block&gt;px;\nzoom-height: &lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ZoomedImagePosition%22%20%2f%3e%20%3d%3d%20%22inner%22\"&gt;&lt;actinic:variable name=\"ProductImageHeight\" selectable=\"false\" \/&gt;&lt;\/actinic:block&gt;&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ZoomedImagePosition%22%20%2f%3e%20%21%3d%20%22inner%22\" &gt;&lt;actinic:variable name=\"ZoomedImageHeight\" selectable=\"false\" \/&gt;&lt;\/actinic:block&gt;px;\"&gt;\n\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e\"&gt;\n&lt;img class=\"d-none d-md-block&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e%20%21%3d%20%22%22%20AND%0d%3cactinic%3avariable%20name%3d%22ProductImageWidth%22%20%2f%3e%20%3e%20%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e\" &gt; mzmaxwidth-&lt;actinic:variable name=\"ProductImageMaxWidth\" \/&gt;&lt;\/actinic:block&gt;\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$ppfile\\\" data-src=\\\"$ppfile\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\"\";&lt;\/actinic:block&gt;\nid=\"im-&lt;actinic:variable name=\"EncodedProductAnchor\" \/&gt;\"\nborder=\"0\" \/&gt;\n&lt;img class=\"d-none d-sm-block d-md-none&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e%20%21%3d%20%22%22%20AND%0d%3cactinic%3avariable%20name%3d%22ProductImageWidth%22%20%2f%3e%20%3e%20%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e\" &gt; mzmaxwidth-&lt;actinic:variable name=\"ProductImageMaxWidth\" \/&gt;&lt;\/actinic:block&gt;\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$pprfile\\\" data-src=\\\"$pprfile\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\"\";&lt;\/actinic:block&gt;\nid=\"im-&lt;actinic:variable name=\"EncodedProductAnchor\" \/&gt;\"\nborder=\"0\" \/&gt;\n&lt;img class=\"d-block d-sm-none&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e%20%21%3d%20%22%22%20AND%0d%3cactinic%3avariable%20name%3d%22ProductImageWidth%22%20%2f%3e%20%3e%20%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e\" &gt; mzmaxwidth-&lt;actinic:variable name=\"ProductImageMaxWidth\" \/&gt;&lt;\/actinic:block&gt;\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$ppfile\\\" data-src=\\\"$ppfile\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\"\";&lt;\/actinic:block&gt;\nid=\"im-&lt;actinic:variable name=\"EncodedProductAnchor\" \/&gt;\"\nborder=\"0\" \/&gt;\n&lt;\/actinic:block&gt;\n\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e%20%3d%3d%20False\"&gt;\n&lt;img src=\"&lt;actinic:variable name=\"DefaultProductImage\" \/&gt;\"\nborder=\"0\"\ntitle=\"&lt;actinic:variable name=\"ProductName\" encoding=\"strip\"\/&gt;\"\nalt=\"&lt;actinic:variable name=\"ProductName\" encoding=\"strip\"\/&gt;\" \/&gt;\n&lt;\/actinic:block&gt;\n&lt;\/a&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ZoomIconsPosition%22%20%2f%3e%20%3d%3d%20%22bottom%22\" &gt;&lt;span class=\"mzp-ptab-icons-below\"&gt;&lt;br&gt;&lt;actinic:variable name=\"MagicZoomImages\" value=\"Magic Zoom Image List Swift\" \/&gt;&lt;\/span&gt;&lt;\/actinic:block&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ZoomIconsPosition%22%20%2f%3e%20%3d%3d%20%22right%22\" &gt;&lt;\/p&gt;&lt;p class=\"mzp-ptab-icons-right\"&gt;&lt;actinic:variable name=\"MagicZoomImages\" value=\"Magic Zoom Image List Swift\" \/&gt;&lt;\/p&gt;&lt;\/actinic:block&gt;\n&lt;\/actinic:block&gt;\n\n&lt;actinic:block if=\"%21%28%28%28%3cactinic%3avariable%20name%3d%22ZoomAutoIncludeMainImageWidth%22%20%2f%3e%20%3e%200%29%20%26%26%20%28%3cactinic%3avariable%20name%3d%22ProductImageWidth%22%20%2f%3e%20%3e%3d%20%3cactinic%3avariable%20name%3d%22ZoomAutoIncludeMainImageWidth%22%20%2f%3e%29%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage0%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage1%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage2%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage3%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage4%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage5%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage6%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage7%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage8%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage9%22%20%2f%3e%20%21%3d%20%22%22%29%0dOR%20%28%3cactinic%3avariable%20name%3d%22ZoomImage10%22%20%2f%3e%20%21%3d%20%22%22%29%29\" &gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsPopUpDisplayedByImage%22%20%2f%3e\" &gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ExtendedInformationType%22%20%2f%3e%20%3d%3d%20%22Opens%20in%20a%20Pop%2dUp%20Window%22\"&gt;\n&lt;a href=\"&lt;actinic:variable name=ExtendedInfoPageEncoded \/&gt;\" target=\"ActPopup\" onclick=\"return ShowPopUp('&lt;actinic:variable name=ExtendedInfoPageEncoded \/&gt;',&lt;actinic:variable name=\"ExtInfoWindowWidth\" \/&gt;,&lt;actinic:variable name=\"ExtInfoWindowHeight\" \/&gt;);\"&gt;\n&lt;\/actinic:block&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ExtendedInformationType%22%20%2f%3e%20%3d%3d%20%22Opens%20in%20the%20Same%20Window%22\" &gt;\n&lt;a href=\"&lt;actinic:variable name=\"ExtendedInfoPageName\" \/&gt;\"&gt;\n&lt;\/actinic:block&gt;\n&lt;\/actinic:block&gt;\n\n&lt;actinic:block if=\"%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22%29%20AND%20%28%3cactinic%3avariable%20name%3d%22ProductListImageLink%22%20%2f%3e%20%3d%3d%201%29\" &gt;&lt;a href=\"&lt;actinic:variable name=\"ProductPageName\" \/&gt;#SID=&lt;actinic:variable name=\"SectionID\" \/&gt;\"&gt;\n&lt;\/actinic:block&gt;\n\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e\"&gt;\n&lt;img class=\"d-none d-md-block&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e%20%21%3d%20%22%22%20AND%0d%3cactinic%3avariable%20name%3d%22ProductImageWidth%22%20%2f%3e%20%3e%20%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e\" &gt; mzmaxwidth-&lt;actinic:variable name=\"ProductImageMaxWidth\" \/&gt;&lt;\/actinic:block&gt;\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$ppfile\\\" data-src=\\\"$ppfile\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\" width=\\\"$ppwidth\\\" height=\\\"$ppheight\\\"\";&lt;\/actinic:block&gt;\nid=\"im-&lt;actinic:variable name=\"EncodedProductAnchor\" \/&gt;\"\nborder=\"0\" \/&gt;\n&lt;img class=\"d-none d-sm-block d-md-none&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e%20%21%3d%20%22%22%20AND%0d%3cactinic%3avariable%20name%3d%22ProductImageWidth%22%20%2f%3e%20%3e%20%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e\" &gt; mzmaxwidth-&lt;actinic:variable name=\"ProductImageMaxWidth\" \/&gt;&lt;\/actinic:block&gt;\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$pprfile\\\" data-src=\\\"$pprfile\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\" width=\\\"$pprwidth\\\" height=\\\"$pprheight\\\"\";&lt;\/actinic:block&gt;\nid=\"im-&lt;actinic:variable name=\"EncodedProductAnchor\" \/&gt;\"\nborder=\"0\" \/&gt;\n&lt;img class=\"d-block d-sm-none&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e%20%21%3d%20%22%22%20AND%0d%3cactinic%3avariable%20name%3d%22ProductImageWidth%22%20%2f%3e%20%3e%20%3cactinic%3avariable%20name%3d%22ProductImageMaxWidth%22%20%2f%3e\" &gt; mzmaxwidth-&lt;actinic:variable name=\"ProductImageMaxWidth\" \/&gt;&lt;\/actinic:block&gt;\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$ppfile\\\" data-src=\\\"$ppfile\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\" width=\\\"$ppwidth\\\" height=\\\"$ppheight\\\"\";&lt;\/actinic:block&gt;\nid=\"im-&lt;actinic:variable name=\"EncodedProductAnchor\" \/&gt;\"\nborder=\"0\" \/&gt;\n&lt;\/actinic:block&gt;\n\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e%20%3d%3d%20False\"&gt;\n&lt;img src=\"&lt;actinic:variable name=\"DefaultProductImage\" \/&gt;\"\nborder=\"0\"\ntitle=\"&lt;actinic:variable name=\"ProductName\" encoding=\"strip\"\/&gt;\"\nalt=\"&lt;actinic:variable name=\"ProductName\" encoding=\"strip\"\/&gt;\" \/&gt;\n&lt;\/actinic:block&gt;\n\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsPopUpDisplayedByImage%22%20%2f%3e%20OR%0d%28%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%3d%3d%20%22Section%22%29%20AND%20%0d%28%3cactinic%3avariable%20name%3d%22ProductListImageLink%22%20%2f%3e%20%3d%3d%201%29%29\" &gt;\n&lt;\/a&gt;\n&lt;\/actinic:block&gt;\n&lt;\/actinic:block&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22IsProductImageDisplayed%22%20%2f%3e\"&gt;\n&lt;actinic:variable name=\"PinterestButtonLayout\" value=\"Product Pin It Button Layout\" \/&gt;\n&lt;\/actinic:block&gt;\n<\/code><\/pre>\n\n\n\n<p><strong>Standard Promotional List Entry &#8211; Simple Image Revised July 2021<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>]&lt;actinic:block php=\"true\" &gt;\ninclude_once 'simpleImage.php';\nerror_reporting(E_ALL &amp; ~E_NOTICE);\n$altname = '&lt;actinic:variable name=\"CarouselCaption\" encoding=\"perl\" selectable=\"false\" \/&gt; image';\n$sOrigimagesple&lt;actinic:variable encoding=\"perl\" name=\"FragmentID\" selectable=\"false\" \/&gt; = str_replace('\\\\','\/', '&lt;actinic:variable name=\"ItemImage\" encoding=\"perl\" selectable=\"false\" \/&gt;');\n$scaleddir = 'scaled\/';\n$simpleimagebase = basename($sOrigimagesple&lt;actinic:variable encoding=\"perl\" name=\"FragmentID\" selectable=\"false\" \/&gt;);\n$splewidthlg = 1112;\n$splewidthmd = 993;\n$splewidthsm = 768;\n$splewidthxs = 576;\n$splefilelg = $scaleddir . 'splelg_' . $simpleimagebase;\n$splefilemd = $scaleddir . 'splemd_' . $simpleimagebase;\n$splefilesm = $scaleddir . 'splesm_' . $simpleimagebase;\n$splefilexs = $scaleddir . 'splexs_' . $simpleimagebase;\ntry\n{\nif ( file_exists($sOrigimagesple&lt;actinic:variable encoding=\"perl\" name=\"FragmentID\" selectable=\"false\" \/&gt;) )\n{\n$simpleimagesple&lt;actinic:variable encoding=\"perl\" name=\"FragmentID\" selectable=\"false\" \/&gt; = new \\claviska\\SimpleImage($sOrigimagesple&lt;actinic:variable encoding=\"perl\" name=\"FragmentID\" selectable=\"false\" \/&gt;);\n$simpleimagesple&lt;actinic:variable encoding=\"perl\" name=\"FragmentID\" selectable=\"false\" \/&gt; -&gt; resize($splewidthlg) -&gt; toFile($splefilelg);\n$simpleimagesple&lt;actinic:variable encoding=\"perl\" name=\"FragmentID\" selectable=\"false\" \/&gt; -&gt; resize($splewidthmd) -&gt; toFile($splefilemd);\n$simpleimagesple&lt;actinic:variable encoding=\"perl\" name=\"FragmentID\" selectable=\"false\" \/&gt; -&gt; resize($splewidthsm) -&gt; toFile($splefilesm);\n$simpleimagesple&lt;actinic:variable encoding=\"perl\" name=\"FragmentID\" selectable=\"false\" \/&gt; -&gt; resize($splewidthxs) -&gt; toFile($splefilexs);\n}\n}\ncatch(Exception $err)\n{\n\/\/ Handle errors\necho $err-&gt;getMessage();\n}\n&lt;\/actinic:block&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ItemType%22%20%2f%3e%20%21%3d%202\" &gt;\n&lt;div class=\"slide-entry\"&gt;\n&lt;a href=\"&lt;actinic:variable name=\"ItemLink\" selectable=\"false\" \/&gt;\"&gt;\n&lt;img class=\"d-none d-lg-block\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$splefilelg\\\" data-src=\\\"$splefilelg\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\"\";&lt;\/actinic:block&gt;\"\/&gt;\n&lt;img class=\"d-none d-md-block d-lg-none\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$splefilemd\\\" data-src=\\\"$splefilemd\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\"\";&lt;\/actinic:block&gt;\"\/&gt;\n&lt;img class=\"d-none d-sm-block d-md-none\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$splefilesm\\\" data-src=\\\"$splefilesm\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\"\";&lt;\/actinic:block&gt;\"\/&gt;\n&lt;img class=\"d-block d-sm-none\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$splefilexs\\\" data-src=\\\"$splefilexs\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\"\";&lt;\/actinic:block&gt;\"\/&gt;\n&lt;\/a&gt;\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22CarouselCaption%22%20%2f%3e%20%21%3d%20%22%22\" &gt;\n&lt;div class=\"carousel-caption\"&gt;\n&lt;h3&gt;&lt;actinic:variable name=\"CarouselCaption\" \/&gt;&lt;\/h3&gt;\n&lt;\/div&gt;\n&lt;\/actinic:block&gt;\n&lt;\/div&gt;\n&lt;\/actinic:block&gt;\n\n&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22ItemType%22%20%2f%3e%20%3d%3d%202\" &gt;\n&lt;div class=\"slide-entry\"&gt;\n&lt;a href=\"&lt;actinic:variable name=\"ItemLink\" selectable=\"false\" \/&gt;\"&gt;\n&lt;img class=\"d-none d-lg-block\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$splefilelg\\\" data-src=\\\"$splefilelg\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\"\";&lt;\/actinic:block&gt;\"\/&gt;\n&lt;img class=\"d-none d-md-block d-lg-none\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$splefilemd\\\" data-src=\\\"$splefilemd\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\"\";&lt;\/actinic:block&gt;\"\/&gt;\n&lt;img class=\"d-none d-sm-block d-md-none\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$splefilesm\\\" data-src=\\\"$splefilesm\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\"\";&lt;\/actinic:block&gt;\"\/&gt;\n&lt;img class=\"d-block d-sm-none\" src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$splefilexs\\\" data-src=\\\"$splefilexs\\\" alt=\\\"$altname\\\" title=\\\"$altname\\\"\";&lt;\/actinic:block&gt;\"\/&gt;\n&lt;\/a&gt;\n&lt;\/div&gt;\n&lt;\/actinic:block&gt;\n<\/code><\/pre>\n\n\n\n<p><strong>Top Level Section &#8211; No Description Section Link Swift &#8211; Simple Image Revised July 2021<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>]&lt;actinic:block if=\"%3cactinic%3avariable%20name%3d%22SectionImageFileName%22%20%2f%3e%20%21%3d%20%22%22\"&gt;\n&lt;actinic:block php=\"true\" &gt;\ninclude_once 'simpleImage.php';\nerror_reporting(E_ALL &amp; ~E_NOTICE);\n$altname = '&lt;actinic:variable name=\"SectionName\" encoding=\"perl\" selectable=\"false\" \/&gt; image';\n$sOrigimagendsl&lt;actinic:variable encoding=\"perl\" name=\"SectionID\" selectable=\"false\" \/&gt; = str_replace('\\\\','\/', '&lt;actinic:variable name=\"SectionImageFileName\" encoding=\"perl\" selectable=\"false\" \/&gt;');\n$scaleddir = 'scaled\/';\n$simpleimagebasendsl&lt;actinic:variable encoding=\"perl\" name=\"SectionID\" selectable=\"false\" \/&gt; = basename($sOrigimagendsl&lt;actinic:variable encoding=\"perl\" name=\"SectionID\" selectable=\"false\" \/&gt;);\n$sxwidth = 420;\n$sxrwidth = 770;\n$sxfile = $scaleddir . 'sx_' . $simpleimagebasendsl&lt;actinic:variable encoding=\"perl\" name=\"SectionID\" selectable=\"false\" \/&gt;;\n$sxrfile = $scaleddir . 'sxr_' . $simpleimagebasendsl&lt;actinic:variable encoding=\"perl\" name=\"SectionID\" selectable=\"false\" \/&gt;;\n\nif ( file_exists($sOrigimagendsl&lt;actinic:variable encoding=\"perl\" name=\"SectionID\" selectable=\"false\" \/&gt;) )\n{\n$sxheight = ($sxwidth*(&lt;actinic:variable encoding=\"perl\" name=\"SectionImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"SectionImageWidth\" selectable=\"false\" \/&gt;)) ;\n$sxrheight = ($sxrwidth*(&lt;actinic:variable encoding=\"perl\" name=\"SectionImageHeight\" selectable=\"false\" \/&gt;\/&lt;actinic:variable encoding=\"perl\" name=\"SectionImageWidth\" selectable=\"false\" \/&gt;)) ;\n}\n\ntry\n{\nif ( file_exists($sOrigimagendsl&lt;actinic:variable encoding=\"perl\" name=\"SectionID\" selectable=\"false\" \/&gt;) )\n{\n$simpleimagendsl&lt;actinic:variable encoding=\"perl\" name=\"SectionID\" selectable=\"false\" \/&gt; = new \\claviska\\SimpleImage($sOrigimagendsl&lt;actinic:variable encoding=\"perl\" name=\"SectionID\" selectable=\"false\" \/&gt;);\n$simpleimagendsl&lt;actinic:variable encoding=\"perl\" name=\"SectionID\" selectable=\"false\" \/&gt; -&gt; resize($sxwidth) -&gt; toFile($sxfile);\n$simpleimagendsl&lt;actinic:variable encoding=\"perl\" name=\"SectionID\" selectable=\"false\" \/&gt; -&gt; resize($sxrwidth) -&gt; toFile($sxrfile);\n\n}\n}\ncatch(Exception $err)\n{\n\/\/ Handle errors\necho $err-&gt;getMessage();\n}\n&lt;\/actinic:block&gt;\n&lt;\/actinic:block&gt;\n\n&lt;div class=\"thumbnail section-thumbnail text-center bg-white theme-shadow-h\"&gt;\n&lt;div class=\"image\"&gt;\n&lt;a href=\"&lt;actinic:variable name=\"SectionHref\" \/&gt;\" target=\"_self\" class=\"text-center align-items-center d-flex image-link\"&gt;\n&lt;img src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$sxfile\\\" data-src=\\\"$sxfile\\\" alt=\\\"$altname\\\" width=\\\"$sxwidth\\\" height=\\\"$sxheight\\\"\";&lt;\/actinic:block&gt; class=\"d-none d-md-block lazy lazyload img-responsive product-summary-image ml-auto mr-auto\"&gt;\n&lt;img src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$sxrfile\\\" data-src=\\\"$sxrfile\\\" alt=\\\"$altname\\\" width=\\\"$sxrwidth\\\" height=\\\"$sxrheight\\\"\";&lt;\/actinic:block&gt; class=\"d-none d-sm-block d-md-none lazy lazyload img-responsive product-summary-image ml-auto mr-auto\"&gt;\n&lt;img src=&lt;actinic:block php=\"true\"&gt;echo \"\\\"$sxfile\\\" data-src=\\\"$sxfile\\\" alt=\\\"$altname\\\" width=\\\"$sxwidth\\\" height=\\\"$sxheight\\\"\";&lt;\/actinic:block&gt; class=\"d-block d-sm-none lazy lazyload img-responsive product-summary-image ml-auto mr-auto\"&gt;\n&lt;\/a&gt;\n&lt;div class=\"caption\"&gt;\n&lt;a class=\"text-center\" href=\"&lt;actinic:variable name=\"SectionHref\" \/&gt;\"&gt;&lt;actinic:variable encoding=\"actinic\" name=\"SectionName\" \/&gt;&lt;\/a&gt;\n&lt;\/div&gt;\n&lt;\/div&gt;\n&lt;\/div&gt;\n<\/code><\/pre>\n\n\n\n<p>Finally take a look in the stylesheet for <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>img {\n    max-width: 100%;\n    max-height: 100%;\n}<\/code><\/pre>\n\n\n\n<p>And edit it thus:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>img {\n    max-width: 100%;\n    max-height: 100%;\n    height:auto;\n}<\/code><\/pre>\n\n\n\n<p>By all means use and develop as you wish but remember this is posted in good faith without any warranty or guarantee express or implied.<br><br>Thank you.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In July 2020 I wrote about resizing images using a php script called Simple Image (https:\/\/community.sellerdeck.com\/forum\/sellerdeck-ecommerce-software\/sellerdeck-desktop-v18\/552425-page-load-times?p=552830#post552830) I have been developing the concept and along with some valuable input from Norman Rouxell of drillpine.biz regarding using the script with a Bootstrap<span class=\"ellipsis\">&hellip;<\/span> <a href=\"https:\/\/www.graphicz.co.uk\/blog\/serving-scaled-images-resizing-images\/\"><\/p>\n<div class=\"read-more\"><b>Read more &#8250;<\/b><\/div>\n<p><!-- end of .read-more --><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-689","post","type-post","status-publish","format-standard","hentry","category-graphicz-articles"],"_links":{"self":[{"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/posts\/689"}],"collection":[{"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=689"}],"version-history":[{"count":3,"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/posts\/689\/revisions"}],"predecessor-version":[{"id":693,"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/posts\/689\/revisions\/693"}],"wp:attachment":[{"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=689"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=689"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.graphicz.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=689"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}