Posts

Showing posts from July, 2016

Get nicer thumbnails for my Post snippets

Image
I recently received some feedback that my thumbnails are a bit nicer than the standard thumbnails offered by Blogger. This is because I use a custom snippet in my Blog widget, to produce bigger thumbnails, using the new resizeImage operator.

Note: This post leverages the techniques described in the article about Responsive images for Google photos.

A note: The resizing behaviour provided on Blogger requires that the image is hosted on a Google platform to work - provided that you add your images by uploading them in the editor, this technique should work. Creating a responsive, resized Thumbnail The resize operator takes 3 parameters - the URL of the image, the width to resize it to, and an optional ratio for a cropped version of the image.

<img expr:src=’resizeImage(data:post.firstImageUrl, 300)’ />
In my Blog widget, I've customized the HTML so that on feed views (homepage, search, etc), I display post snippets instead of the full post. As a part of these snippets, I do a s…