xxScorpionxx replied
Now yes, it already worked. Thanks a lot.
Help me here, you can test the filter, I don't think it will work for you, I have also tried on normally loaded images and I have also tried with disabled plugins just in case it was some incompatibility. The filter does not work.
I have copied your filter and it does not work, the urls continue to appear the same, I have put the corresponding id, I have also cleared cache and tried in several browsers just in case. Something is wrong with the filter.
In case it has something to do with it, which I don't think, the images load in document.addEventListener("DOMContentLoaded", function(event)
The pency lazy script is warping my images in the custom script I use to display images.
The original urls I use are like this:
var images = ['<a href="/out/a1" id="id1" target="_blank" rel="nofollow"><img src="/wp-content/uploads/img1.jpg" alt="alt1" loading="lazy" id="idI1" width="300" height="250"></a>', '<a href="out/a2" id="id2" target="_blank" rel="nofollow"><img src="/wp-content/uploads/img2.jpg" alt="alt2" loading="lazy" id="idI2" width="300" height="250"></a>', '<a href="/out/a3" id="id3" target="_blank" rel="nofollow"><img src="/wp-content/uploads/img3.jpg" alt="alt3" loading="lazy" id="idI3" width="300" height="250"></a>'];
and transform them into this:
var images = ['<a href="/out/a1" id="id1" target="_blank" rel="nofollow"><img class=" penci-lazy " src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20100'%3E%3C/svg%3E" data-src="/wp-content/uploads/img1.jpg" alt="alt1" loading="lazy" id="idI1" width="300" height="250"></a>', '<a href="out/a2" id="id2" target="_blank" rel="nofollow"><img class=" penci-lazy " src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20100'%3E%3C/svg%3E" data-src="/wp-content/uploads/img2.jpg" alt="alt2" loading="lazy" id="idI2" width="300" height="250"></a>', '<a href="/out/a3" id="id3" target="_blank" rel="nofollow"><img class=" penci-lazy " src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20100'%3E%3C/svg%3E" data-src="/wp-content/uploads/img3.jpg" alt="alt3" loading="lazy" id="idI3" width="300" height="250"></a>'];
consequently I get the error: Uncaught SyntaxError: missing ] after element list
and the problem I imagine comes from the svg url and its quotes:
src="data:image/svg+xml,%3Csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20300%20100'%3E%3C/svg%3E"
Solution? Some fix? Can you send me the previous version the shortcodes and performance until it is solved?
Want to join this conversation or access attachments? Sign in first.
Open your ticket archive, review validated licenses, and continue product support conversations from one customer portal.