Image Type SVG

16 posts by 5 authors in: Forums > CMS Builder
Last Post: February 5, 2021   (RSS)

By Toledoh - November 26, 2020

done:)

Cheers,

Tim (toledoh.com.au)

By Toledoh - January 27, 2021

No Jenna, it was never resolved.  thanks for following up.

Cheers,

Tim (toledoh.com.au)

By Steve99 - February 4, 2021

Came up with a working patch based on Daryl's post.

Latest cmsb version in same file (upload_functions.php) and function (showUploadPreview) Daryl referenced.

Before
// output preview html

Add

  // display image preview for svg image file type
  if (preg_match("/\.(svg)$/i", $uploadRecord['urlPath'])) {
    $bestSrc    = $uploadRecord['urlPath'];
    $bestWidth  = "50";
    $bestHeight = "50";
  }

Seems those three strings aren't being set for svg's since their width and height values are saved as 0 in the uploads table.

By gkornbluth - February 4, 2021

Goo job Steve99

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php

By Toledoh - February 5, 2021

Thanks Steve!  I've travelling currently - but will test it out later next week!

Cheers,

Tim (toledoh.com.au)