From f968f065bc937816abb8166eab22e08bf4721489 Mon Sep 17 00:00:00 2001 From: Luke Fromhold <576903+dizzystuff@users.noreply.github.com> Date: Sat, 6 Jan 2024 16:50:42 +1100 Subject: [PATCH] Update README.md --- README.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a30ce1c..e744391 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,14 @@ # silverstripe-svgenius -First-class SVG handling for Silverstripe CMS & front-end + +First-class SVG handling for Silverstripe CMS & front-end. + +Requires Silverstripe 5+. + +- SVGs can be uploaded into Asset Admin just like images +- Thumbnail of SVG is displayed on Asset Admin grid view +- Asset CMS fields adjusted to hide focuspoint field for SVGs when jonom/focuspoint is installed +- Retrieve height, width, orientation, and apply resizing by ratio, width or height using existing manipulation methods (Fit, FitMax, ScaleWidth, ScaleMaxWidth, ScaleHeight, ScaleMaxHeight) +- Can embed in front-end as an tag, or embed the svg file contents +- SVG contents are passed through santisation library [enshrined\svgSanitize](https://github.com/darylldoyle/svg-sanitizer) + +Note, this behaviour is not included out-of-the-box in Silverstripe due to the security risks inherent with user-supplied SVG files. Per above, this module does process SVGs through a sanitisation process, but this needs to be combined with your own strategies and in consideration of your use case to reach acceptable security.