prefix; $attachment = $wpdb->get_col($wpdb->prepare("SELECT ID FROM " . $prefix . "posts" . " WHERE guid='%s';", $image_url )); return $attachment[0]; } endif; // ! _sf_get_image_id exists /** * Responsive Image Thing * */ if (! get_theme_mod( '_sf_masonry' ) == '' ) : if (! function_exists('_sf_responsive_img') ) : function _sf_responsive_img($html, $post_id, $post_thumbnail_id, $size, $attr) { //make image links $attachment_id = $post_thumbnail_id; $default = wp_get_attachment_image_src($attachment_id); $size = 'fd-sm'; $small = wp_get_attachment_image_src($attachment_id, $size); $size = 'fd-med'; $med = wp_get_attachment_image_src($attachment_id, $size); $size = 'fd-lrg'; $lrg = wp_get_attachment_image_src($attachment_id, $size); //create image tag with queries $html = '