
Security News
NVD Concedes Inability to Keep Pace with Surging CVE Disclosures in 2025
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
handlebars-helper-inlinesvg
Advanced tools
handlebars-helper-inlineSVG
:bear:Handlebars helper to inline SVGs
First, add handlebars-helper-inlineSVG
as a project dependency using Yarn (or NPM).
yarn add gulp handlebars-helper-inlineSVG
Then register this module as a handlebars helper:
import Handlebars from 'handlebars'; // assumes you have handlebars installed as a project dependency
Handlebars.registerHelper('inlineSVG', inlineSVG);
Then you can inline SVG files from either your local filepaths or from installed packages.
For example to load in a file called test.svg
which is in a folder called img
in your project you would include the following in your handlebars template:
{{inlineSVG "img/test.svg"}}
To inline an SVG from a module you have installed, you simply need to prefix the module name to the filepath within that module that the SVG is located in:
{{inlineSVG "@justeat/f-icons/src/img/icons/arrows/chevron.svg"}}
You can also pass attributes to the root element in your SVG, like so:
{{inlineSVG "img/test.svg" class="myClass" width="100" height="100" }}
JavaScript tests are located in the test
directory at the root of the project.
FAQs
Handlebars helper to inline SVGs
The npm package handlebars-helper-inlinesvg receives a total of 22 weekly downloads. As such, handlebars-helper-inlinesvg popularity was classified as not popular.
We found that handlebars-helper-inlinesvg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Security experts warn that recent classification changes obscure the true scope of the NVD backlog as CVE volume hits all-time highs.
Security Fundamentals
Attackers use obfuscation to hide malware in open source packages. Learn how to spot these techniques across npm, PyPI, Maven, and more.
Security News
Join Socket for exclusive networking events, rooftop gatherings, and one-on-one meetings during BSidesSF and RSA 2025 in San Francisco.