rasteiner / k3-svg-filemethods
K3 plugin. File methods for SVG files.
Installs: 7
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/rasteiner/k3-svg-filemethods
Requires
- getkirby/cms: *
This package is auto-updated.
Last update: 2025-10-22 07:34:07 UTC
README
K3 plugin. File methods for SVG files.
Install
Download Zip file
Copy plugin folder into site/plugins
Composer
Run composer require rasteiner/k3-svg-filemethods.
Features
- Trim an svg file to its visible bounds
- Rotate an svg file by any degree.
Usage example
In a template, a page contains an svg file.
<?php if($img = $page->image('graphic.svg')): ?> <img src="<?php echo $img->trimSVG()->rotate(90)->url() ?>" alt=""> <?php endif; ?>
Issues
Currently this plugin requires you to not have any other plugin that registers a file::url or a thumb component.