[ad_1]
Some image lazy loading plugin seems to break the JavaScript code. It tries to inject lazy loading code, but breaks the JavaScript code in the process:
return string.replace(':' + emoji.shortcode + ':', '<img src="data:image/svg+xml,%3Csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20width="0"%20height="0"%20viewBox=%270%200%200%200%27%3E%3C/svg%3E" loading="lazy" data-lazy="1" decoding="async" class="tf_svg_lazy emoji" data-tf-src="' + emoji.url + '" title="' + emoji.shortcode + '" /><noscript><img class="emoji" data-tf-not-load src="' + emoji.url + '" title="' + emoji.shortcode + '" /></noscript>');The original source code of the mastodon plugin looks like this:
return string.replace(':' + emoji.shortcode + ':', '<img class="emoji" src="' + emoji.url + '" title="' + emoji.shortcode + '" />');Typically those optimization plugins allow to define exceptions. If you can define an exception for all images with the class “emoji” it should stop breaking the plugin.
Other quick-fix would be to disable the plugin that breaks the JavaScript code.
Can you provide me with the name of the image lazy loading / optimization / caching plugin that you are using? I might find some time to look into it a bit deeper.
