I downloaded some svgs from bootstrap and added them to my project. Here is an example of person-fill.svg:
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-person" viewBox="0 0 16 16">
<path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6Zm2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4Zm-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10c-2.29 0-3.516.68-4.168 1.332-.678.678-.83 1.418-.832 1.664h10Z"/>
</svg>
If I place this content directly into html, I can manipulate colors through fill and stroke properties.
However, in order to reuse this svg, I added it to my project as svg file, and then I reference it in html through img tag:
<img class="user-icon" src="/images/svg/person-fill.svg" title="User profile" />
This works, however, now I am unable to change colors. Basically, I could change the background color by setting background-color attribute on user-icon class, since this svg is transparent, but I am unable to truly set the fill and stroke attributes.
Anyone knows if its possible to control svg's fill and stroke attributes (preferentially through css class), without the need to copy svg content directly to html? If not, is there some other way where I do not need to copy svg everywhere I use it?