ideas
ideas copied to clipboard
Icon Fieldtype Augmentation (SVG Tag Support)
I think many users may need or expect icon field type to act like an SVG tag by default. Or may need to use the path of the file in an svg tag.
But as the current augmentation returns the SVG file contents directly it's not possible to use extra classes etc with the required stylings on the front end.
public function augment($value)
{
[$path] = $this->resolveParts();
// return ($path.'/'.$value.'.svg');
return File::get($path.'/'.$value.'.svg');
}