728x90 AdSpace

Latest News
Thursday, September 21, 2017

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.
  • Blogger Comments
  • Facebook Comments

0 comments:

Post a Comment

Item Reviewed: Post thumbnails from external urls don't appear in Blogger. How to resolve? Rating: 5 Reviewed By: Thiruvikraman Govindarajan