Highlighted

Target Images Not Loading Over HTTPS

jimc30192438 04-12-2017

We're moving our website to https://. Images within Target tests are not loading because $e.thumbnailUrl is rendering the URL as http:// instead of https://.

Has anyone encountered this issue?

#set($count=1)

#foreach($e in $entities) 

#if($e.id != "" && $count < $entities.size() && $count <=30)

<li>

     <a class="productBlock" href="$e.pageUrl?icid=ChrLPGiftRecsMonogrammed"> <img title="$e.name" alt="$e.name" src="$e.thumbnailUrl"></a>

</li>

#set($count = $count + 1)

#end

#end

Replies

Highlighted
Amelia_Waliany
Employee
18-12-2017

Hi there and thanks for your question! You can pass in the thumbnail URL as a relative URL instead of an as absolute URL - this means that the "https" part is not included in the URL. A relative URL is relative to the page you are on, versus a full URL link. If you can't change the code on your page, then another option is to swap out "http" with "https" in javascript in the Recommendations design. Hope this helps!

Highlighted
Amelia_Waliany
Employee
18-12-2017

You might want to update your implementation to send us relative URLs in the future (it's easier that way), but in the meantime, you can always write javascript in the Recommendations Design to strip the absolute part of the URL.