Skip to content

Instantly share code, notes, and snippets.

@enlacee
Created June 19, 2015 08:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save enlacee/0df3170aa6a42c0c92de to your computer and use it in GitHub Desktop.
Save enlacee/0df3170aa6a42c0c92de to your computer and use it in GitHub Desktop.
Library for page blogger JS
/**
* Library for page blogger JS
*/
function bp_thumbnail_resize(image_url, post_title) {
var image_width = 317;
var image_height = 210;
image_tag = '<img width="' + image_width + '" height="' + image_height + '" src="' + image_url.replace('/s72-c/', '/w' + image_width + '-h' + image_height + '-c/') + '" alt="' + post_title.replace(/"/g, "") + '" title="' + post_title.replace(/"/g, "") + '"/>';
if (post_title != "")
return image_tag;
else
return""
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment