Change image using code

Hi all! I’m trying to figure out how can change an image in my website into another image in my media manager using code.
I know I have to use src, but I have no idea what the url looks like so I can do that. I tried copying the image link when I open my published website, but the link looks so weird…I couldn’t make out what the format of it is…
eg: https://static.wixstatic.com/media/18efcd_d0958c95256e4367a170c6680b0b0c87~mv2.png/v1/fill/w_330,h_331,al_c,q_80,usm_0.66_1.00_0.01/swinny.webp

Any help would be greatly appreciated

When you type in .src, an open media manager will appear within the code panel. Select the image you want and it’ll give you the correct link.

Thanks!