I have a page on my website that’s essentially one big HTML block.
That HTML has 5 img tags in it.
I’d like to store those 5 images on my wix website.
I need to know how to include them in my site’s “resources”
and what url to put for the src attribute of the img tags.
I’m expecting those url’s to look something like
http://my-site-name/images/my-image.jpg
Hi!
You can’t do this with WIX. It’s not possible to have straight links to images with current product, even with WixCode
Fortunately for me you’re wrong.
For proof
-Browse https://www.whycantwe.org/no-income-housing
- scroll to the first image (there are 5 of them)
- click right on it and choose “inspect”
- observe in the right pane of dev tools (on Chrome at least) the hghlighted “img” tag with
its src url.
I understand this is a kludge and getting this URL is undocumented by wix.
I also understand how important this functionality is.
If you had ever developed a normal (non-wix) website you’d understand this too.
There are other tricks to embedding images on wix but this is the best I could do.
Please provide a better way to do this or, at the very least, document how to do it.
It will make Wix a much more useful platform.
Dear cfry!
I really NEED to know the URL of the pictures which are in WIX Gallery.
How do you get that?
Thanks millions times.
Bilbo
I mean of course the link to the pictures that I did upload to my own WIX Gallery!
Hi Bilbo!
This can be done simply with items property.
Add something like this -
console.log($w(“#gallery”).items)
Then go to preview
In console you will see array of objects, like
[ { “src”: “wix:image://v1/c3adb8201ae64fa1bef80353d419840a.jpg/Beach Huts/#originWidth=1920&originHeight=1922”, “description”: “Description 1”, “title”: “Title 1” },
{ “src”: “wix:image://v1/a9ff3b_7125cf82b18841c2961ce0a241b78826.jpg/Ferris Wheel/#originWidth=1920&originHeight=1280”, “description”: “Description 2”, “title”: “Title 2” },
{ “src”: “wix:image://v1/a9ff3b_1d0b83b8723c4dc39192405fd083142a.jpg/Palm Trees/#originWidth=1920&originHeight=1280”, “description”: “Description 3”, “title”: “Title 3” } ];
value for src here is actual links to images in gallery