Image Type SVG
16 posts by 5 authors in: Forums > CMS Builder
Last Post: February 5, 2021 (RSS)
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.
interactivetools.com
By Toledoh - January 27, 2021
No Jenna, it was never resolved. thanks for following up.
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.
Goo job Steve99
Jerry Kornbluth
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!
Tim (toledoh.com.au)