Free SVG SVG graphics are great They re compact and not bugged by pixilation problems A really great library to search for SVG resources is freesvg org You can use the website to find free SVG resources But what s really cool is they support an API so you can write custom scripts to search for SVGs e g add a plugin for your program so you can add SVGs without going to a seperate web page and copying pasting the image instead you can search and include the SVG in one go You can register with them and then use the API to search for SVG images using your JavaScript library The following example shows how to login and get authentication part one is just to check that you can login part after that actually grabs the list of SVGs from a search and displays them If you want to use the freesvg library register with their website it s free and it only takes a second Details about the API usage example can be found here https freesvg org pages api and usage https freesvg org pages api and usage ref https freesvg org pages api and usage let URL https reserve freesvg org api v1 auth login let username Test User let password Cats12345 let email test hotmail com curl d email user user com password yourpassword H Accept application json H Content Type application json X POST https reserve freesvg org api v1 auth login const response await fetch URL method post headers Accept application json Content Type application json body JSON stringify email email password password const posts await response json console log posts document body style height 500px ref https freesvg org pages api and usage let URL https reserve freesvg org api v1 auth login let username Test User let password Cats12345 let email test hotmail com curl d email user user com password yourpassword H Accept application json H Content Type application json X POST https reserve freesvg org api v1 auth login const response await fetch URL method post headers Accept application json Content Type application json body JSON stringify email email password password const posts await response json console log posts console log curl H Accept application json H Authorization Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjI4MDU2NmM2ODNlMmZhOTU4ZGMwZWRhMjZhZDEwZGEyMDhhMWVmYTFhYTg4ZjY0NmY4ZmJkMDI3NjQ5NDM1YzVkOGU4Y2EzNjdjYzQxY2YzIn0 eyJhdWQiOiIxIiwianRpIjoiMjgwNTY2YzY4M2UyZmE5NThkYzBlZGEyNmFkMTBkYTIwOGExZWZhMWFhODhmNjQ2ZjhmmQwMjc2NDk0MzVjNWQ4ZThjYE https freesvg org api v1 svg 83149 console log token posts token console log let URL2 https reserve freesvg org api v1 search query cat or if you want a single specific svg URL2 https freesvg org api v1 svg 83149 const response2 await fetch URL2 method get headers Accept application json Content Type application json Authorization Bearer posts token https freesvg org api v1 svg 83149 const posts2 await response2 json console log posts2 https freesvg org storage img thumb no deposit cat thing maze COLORING png for let i 0 i posts2 data length i let img document createElement img document body appendChild img img src https freesvg org storage img thumb posts2 data i thumb console log thumb img src img width 100 img height 100 console log done
name Test User let password Cats12345 let email test hotmail com curl d email user user com password yourpassword H Accept application json H Content Type application json X POST https reserve freesvg org api v1 auth login const response await fetch URL method post headers Accept application json Content Type application json body JSON stringify email email password password const posts await response json console log posts console log curl H Accept application json H Authorization Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjI4MDU2NmM2ODNlMmZhOTU4ZGMwZWRhMjZhZDEwZGEyMDhhMWVmYTFhYTg4ZjY0NmY4ZmJkMDI3NjQ5NDM1YzVkOGU4Y2EzNjdjYzQxY2YzIn0 eyJhdWQiOiIxIiwianRpIjoiMjgwNTY2YzY4M2UyZmE5NThkYzBlZGEyNmFkMTBkYTIwOGExZWZhMWFhODhmNjQ2ZjhmmQwMjc2NDk0MzVjNWQ4ZThjYE https freesvg org api v1 svg 83149 console log token posts token console log let URL2 https reserve freesvg org api v1 search query cat or if you want a single specific svg URL2 https freesvg org api v1 svg 83149 const response2 await fetch URL2 method get headers Accept application json Content Type application json Authorization Bearer posts token https freesvg org api v1 svg 83149 const posts2 await response2 json console log posts2 https freesvg org storage img thumb no deposit cat thing maze COLORING png for let i 0 i posts2 data length i let img document createElement img document body appendChild img img src https freesvg org storage img thumb posts2 data i thumb console log thumb img src img width 100 img height 100 console log done