Support » How-To and Troubleshooting » post_thumbnail producing wp-includes/images/crystal/default.png

post_thumbnail producing wp-includes/images/crystal/default.png

  • i’m using timthumb in correlation with the post_thumbnail functionality of wordpress. i’ve had a ton of issues w/ timthumb, but i have those sorted and now the problem lies in the image source file that I am passing to timthumb.

    i’ve got a large function that runs through a bunch of places to try to find a thumbnail for the particular post… starting w/ checking to see if the post has_post_thumbnail()

    but i’ve got a post that does NOT have a post thumbnail and is still triggering this part of the code. it is then spitting out the src of this fake thumbnail as :


    here is the beginning part of my code:

    if ( has_post_thumbnail() ) {
    		$image_id = get_post_thumbnail_id();
    		$image_url = wp_get_attachment_image_src($image_id,$size, true);
    		$img_src = $image_url[0]; 
    		$img_alt = get_post_meta($image_id, '_wp_attachment_image_alt', true);
    		if(!count($img_alt)) {$img_alt= $post->post_title;} else { $img_alt = $post->post_title . ' thumbnail'; }
    		$debug = 'post_thumb';

    later on where i use timthumb to generate the image- i echo out the $debug just to know which part of my code is producing the thumb- which is why i am convinced that my if(has_post_thumbnail()) is triggering true, even though my post doesn’t have a thumbnail. even if i thought that my wp_get_attachment_image_src bits were doing weird things, w/o a thumbnail it shouldn’t even be executing that code right?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael


    Forum Moderator

    what code is doing the output of the div .homePlayerWrapper ?

    and particularly, the output of the div .scrollWrapper ?

    do you think i might be closing some tags improperly? well there is quite a bit of code. this is a child theme built on the Thematic framework so i have lots of functions being placed on different action hooks.

    specifically, i’ve only worked on the category and single pages…

    so this:

    would be better than looking at the home page.

    here’s my markup for the main video, and the 2 rows of smaller thumbs

    [code moderated as per forum rules – please use the pastebin]


    and just b/c that post was getting out of control (and when i help other people i get overwhelmed w/ huge blocks of code) i’ll post my image getting function in this post:

    [code moderated as per forum rules – please use the pastebin]


    it is an amalgamation of a lot of different sources, but i am aiming for it to be very determined to find something usable as a thumb.



    Forum Moderator

    it should have warned you about the pastebin 😉

    you thumbcode seems to be using the kia_image(100,100) function;

    in line98 (in the second pastebin) it sets the default image if anything else failed:

                    $img_src = IMAGES . 'default-thumb.png';
                    $img_alt= $post->post_title . ' thumbnail';
                    $debug = 'default';

    i don’t see any easy option to avoid the output of some default image.

    except that echoing out the $debug character is giving me the value that is set during the if(has_post_thumb()){} section ??

    also- a default image is fine, but IMAGES is a constant I have defined the should point to my theme’s image folder and not the wp-includes folder. but will double check (though i’ve used that constant elsewhere w/ no problems)

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘post_thumbnail producing wp-includes/images/crystal/default.png’ is closed to new replies.
Skip to toolbar