So, I'm attempting to create some tag images for my users, showing the total points that they have earned. I am attempting to write the SVG in a php file which will add in dynamic content, such as the user's points. I'd like to use a HTML <image>
tag to fetch the SVG from a file image_gen.php
.
How would I display the SVG through the <image>
tag?
Thanks!
Using the following PHP code, I set the content type of the file to
svg+xml
: