Featured Image Broken in Category View

Homepage Forums Pro Support Forum Blackoot Pro Blackoot Pro Bug Reports Featured Image Broken in Category View

Featured Image Broken in Category View

This topic contains 5 replies, has 2 voices, and was last updated by  Cheyenne 1 year, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #18160
    Featured Image Broken in Category View

    Cheyenne
    Participant

    Hi Iceable,

    Yes, me again. 🙂

    In the documentation for Blackoot I believe you mention that 680x300px is recommended for the “Featured Image” on posts. Most of the time I adhere to this, as I like the resulting look for the post. But…sometimes the image I want to use as the featured image can’t be put into those dimensions. If the image is larger, it will display properly on the site index and when viewing the post via its permalink, but in category view, only the alt text is shown instead.

    Examples:
    http://incyanity.net/frogged/ versus http://incyanity.net/category/book-of-days/
    http://www.ilfcorp.com/intaki/blind-auction/ and http://www.ilfcorp.com/intaki/ante/ versus http://www.ilfcorp.com/category/intaki/

    Can this be fixed? Thanks!

    #18168
    Reply to: Featured Image Broken in Category View

    iceable
    Keymaster
    Support
    Happy with my help?
    Buy me a beer!

    Hi Cheyenne,

    It seems that the image that is trying to be displayed doesn’t actually exist on your server so it returns a 404 error instead (this is why the alt text is shown since there is no image to display).

    For example, the featured image for “frogged”: http://incyanity.net/articles/frogged-564×300.jpg

    Either the image didn’t get uploaded correctly, or WordPress failed to generate this image size from it.
    If you are using a plugin or have tweaked any setting to prevent WordPress from generating various image sizes when you upload an new image, you may want to double check this; the “image size” that is used in index view is “post-thumbnail” which WordPress should create by default upon upload.

    #18172
    Reply to: Featured Image Broken in Category View

    Cheyenne
    Participant

    Ah, interesting.

    Actually, I delete all the image files that WP automatically generates, because I don’t want any of them. I’m a Photoshop user so I don’t need WP to “babysit” me regarding image dimensions, and I really wish WP would give advanced users a way to turn that garbage off. 🙂 If I want to use another size then I’ll upload one at another size myself!

    So, for the theme, if I choose image X as the featured image then I expect that exact file to be displayed everywhere, rather than the theme looking for a totally separate file that will never exist. Perhaps the code could be set to ensure the display width of the image actually chosen for the post doesn’t exceed 100% of the width of the parent element–but I don’t see why that should be needed because the 680px wide images display properly so why not one that is less wide but taller in height?

    What do you think?

    #18174
    Reply to: Featured Image Broken in Category View

    iceable
    Keymaster
    Support
    Happy with my help?
    Buy me a beer!

    Okay, I understand better now! So if you do take care of sizing your images properly before uploading them (unlike the vast majority of users 😉 ), you indeed won’t need the various WordPress generated image sizes and you can tweak the code so it will look for the original image rather than the generated one.

    The change can be made in index.php (of course it is recommended to copy it into a child theme and edit the child theme’s copy) on line 53.

    By default it pulls the ‘post-thumbnail’ version of the image:

    the_post_thumbnail('post-thumbnail', array('class' => 'scale-with-grid')); ?></a></div><?php

    Change ‘post-thumbnail’ to ‘full’ and it will pull the original image which you have uploaded instead of looking for the automatically generated one:

    the_post_thumbnail('full', array('class' => 'scale-with-grid')); ?></a></div><?php

    #18211
    Reply to: Featured Image Broken in Category View

    Cheyenne
    Participant

    Heh, yeah. I suppose I am a bit anal or OCD about that kind of thing. Not an expert by any means but I know enough about web programming, graphic design, and the like to know how to optimize my images properly. I also prefer to have a tidy file structure on the server. 🙂

    Thanks for the solution! I’ll give it a try.

    #18232
    Reply to: Featured Image Broken in Category View

    Cheyenne
    Participant

    Sweet, this worked! Thanks!

Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Featured Image Broken in Category View’ is closed to new replies.


PayPal Verified
Secured by PayPal
Secure Credit Card payments powered by Stripe
SiteLock