I have used the following code to add a class to an svg image on a Wordpress website.
window.addEventListener(\'load\', function () { const svg = document