'Retrieving image url from webpage using IMPORTXML in Google Sheets

I have this webpage: https://www.loupe360.com/diamond/LG464120206/img

And I am trying to retrieve the jpg url using IMPORTXML in google sheets.

example jpg link: https://nivoda-images.s3.amazonaws.com/aHR0cDovL2RuYS5kaWFtb25kdmlkLmNvbS8/aWQ9NjA0NS00LUNWRC1m/0.jpg

I have seen answers online that //img/@src is supposed to retrieve the url but this does not work on my webpage, I have experimented with many different xpath queries, but still cannot seem to retrieve any data from this webpage and I'm not sure why.



Solution 1:[1]

if you know the image url you can do:

=IMAGE("https://nivoda-images.s3.amazonaws.com/aHR0cDovL2RuYS5kaWFtb25kdmlkLmNvbS8/aWQ9NjA0NS00LUNWRC1m/0.jpg")

enter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 player0