Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save thagxt/9955330 to your computer and use it in GitHub Desktop.
Save thagxt/9955330 to your computer and use it in GitHub Desktop.
Get thumbnail image URI with no http://
<?php
/*
* Wordpress
* Useful when you need to resize an image on the go with; http://i0.wp.com/
*/
?>
<?php // define + trim ?>
<?php
$thumb_id = get_post_thumbnail_id(); $thumb_url = wp_get_attachment_image_src($thumb_id,'steecky', true);
$thumb_url = str_replace('http://', '', $thumb_url);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment