Created
June 19, 2015 08:32
-
-
Save enlacee/0df3170aa6a42c0c92de to your computer and use it in GitHub Desktop.
Library for page blogger JS
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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