jQuery : Get .attr('src') returning "data:image/svg+xml[...]" instead of URL

Hi there,

Using jQuery, i’m trying to copy the url value of the source attribute of an , into a secondary image.

Here’s a codepen working as intended : https://codepen.io/niklab/pen/jOvZdQQ

BUT, when trying this in Bricks Builder, instead of giving me the classic URL I need, the code return this unusual data url :

Is there a way around it ? Is it because of Bricks Builder or am i missing something here ?

Thanks for your help !

try disable lazy load image

I tried but nothing change :confused: actually i dont understand why the loading would be the cause of that, the problem seems to be the wrong URL given.

In the codepen I linked, you can see the URL copied in the second img is a classic “https://[…]”, not some “data:image/… etc…”