Image Type SVG

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

By Toledoh - November 26, 2020


Tim (

By Jenna - January 27, 2021

Hi Tim,

I just wanted to check in on this post: was Hans able to help you get to an acceptable solution for this, or are you still looking for guidance?

Please let us know.

Jenna Cooke - PHP Programmer

By Toledoh - January 27, 2021

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

Tim (

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.

// output preview html


  // 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: