Developer forum

Forum » Swift » Checking if an image is a Local Image?

Checking if an image is a Local Image?

Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

I'm having some trouble on a solution that the Missing Image is not correctly shown.

I found that these lines are possibly part of the issue, in /Files/Templates/Designs/Swift/eCom/ProductCatalog/ProductSliderStandard/Product.cshtml 

What is the idea behind checking for /Files/ ? I my solution all Images are stored in /Files/Images but they should still be handled by the GetImage.ashx?

Thanks,

Justin


Replies

 
Justin Sjouw Dynamicweb Employee
Justin Sjouw
Reply

My missing image settings are set to \Files\Images\missing_image.jpg

But for some reason this is changed to /Images/missing_image.jpg

Which then generates a 404

 
Nicolai Pedersen Dynamicweb Employee
Nicolai Pedersen
Reply

Hi Justin

The issue with missing image is fixed in 21043 - so if you get e new enough DW, that should be solved.

The check for /Files is because you can have external links to e.g. https://host.tld/myimage.jpg and that cannot be passed to getimage.

BR Nicolai

 

You must be logged in to post in the forum