You can’t. You have to process your SVG files outside of the hugo process. They are text files, not images per se and any image processing does not apply to SVG files. Pre-process them and put them into either the page bundle or the static directory.
More general: other external tools than the tools named in the documentation can’t run within the hugo command.
Hugo Pipes allows the minification of any CSS, JS, JSON, HTML, SVG or XML resource.
Look at this page in Hugo docs Minify | Hugo seems like Hugo is aware of what svg is and can minify why would you need an additional tool or move outside of Hugo process?
Hi @Nick_Knutov have you tried the Hugo minification I usually run the --minify and assumes it does the job. have you checked the svg’s with hugo --minify and not happy with the result?
SVGO removes unused definitions, optimises encoding of embedded images, optimised order of the tags, etc., etc. Minification is the least of its tasks.