-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
13c32dd
commit f968f06
Showing
1 changed file
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 <img> tag, or embed the svg file contents <svg> | ||
- 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. |