How to add an image with src attribute?

I want to add an image which is periodically updated / dynamically created. It’s not static. So it must be fetched by using the src attribute.

Is this doable?

If you want to use src for the image, you can use Dev Mode to add that. https://www.wix.com/velo/reference/$w/image/src

I got it working but how to add an image which is empty? Solution here is to use a dummy 1 kb transparent image?

Not well versed but I was able to use ‘about:blank’ and it keeps the default image that was placed.

The Velo API gives this example and just loads a blank image.

$w("#myElement").src = "http://placehold.it/250x250";

I searched for a PNG and this one is 2kb it seems but was able to use Wikipedia as a source.

$w("#imageX1").src = "https://upload.wikimedia.org/wikipedia/commons/thumb/8/89/HD_transparent_picture.png/1280px-HD_transparent_picture.png";