Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Target Images Not Loading Over HTTPS

jimc30192438
Level 1
Level 1

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

3 Replies
Amelia_Waliany
Employee
Employee

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!

jimc30192438
Level 1
Level 1

Do you know how to output the Target variable ($e.thumbnailUrl) as a relative URL?

Amelia_Waliany
Employee
Employee

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.