Ancient Temple City

Post thumbnails from external urls don't appear in Blogger. How to resolve?

You can resolve this issue by using <data:post.firstImageUrl/> tag instead of <data:post.thumbnailUrl/> in the reccent post list code.

Example:


<b:if cond='data:post.firstImageUrl'>
    <a class='wdxthumb' expr:href='data:post.url' expr:title='data:post.title'>
        <img class='post-thumbnail' expr:alt='data:post.title' expr:src='data:post.firstImageUrl'/>
    </a>
    <b:else/>
    <a class='wdxthumb' expr:href='data:post.url' expr:title='data:post.title'>
        <img alt='no image' class='post-thumbnail' src='https://lh3.googleusercontent.com/-VnJqhx42r-c/UfFWlD-sF_I/AAAAAAAAAQI/rT3sYPba2dY/s271-Ic42/logo3.jpg'/>
    </a>
</b:if>


<data:post.firstImageUrl/> tag will return both Picasa hosted images as well as external images.

For the related post widget, you will have to make changes to the code to parse out the Image URL from the HTML response in case the image is not uploaded to Picasa storage.
Labels:
Reactions:

Post a Comment

[blogger]

MKRdezign

{facebook#http://www.facebook.com/GTVCreations} {twitter#http://www.twitter.com/GTVCreations} {google-plus#http://www.google.com} {pinterest#http://www.pinterest.com} {youtube#http://www.youtube.com} {instagram#http://www.instagram.com}

Contact Form

Name

Email *

Message *

Powered by Blogger.
Javascript DisablePlease Enable Javascript To See All Widget