Home Forums Xi Theme Discussion & Support A question about thumbnails and images

This topic is: not a support question

Tagged: 

This topic contains 10 replies, has 2 voices, and was last updated by  themeweaver 5 years, 2 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #1371

    Fishers Church
    Participant
    Post count: 2

    Tim: Loving XI 1.6 with slider for all screen sizes!  I find that it is still readable and just the sense of motion and “freshness” to the site is exciting.

    I am having an issue with images, and I hope you can help me.  I would like more control over what portion of an image appears as a thumbnail in my XI test installation (http://cleantest.fishersofmen.org).  When I created an article, I always designate a featured image.  Then I go into the media section of WP (3.2.1) .  I have been using the built-in WP image editor to edit an image.  I crop to the portion I want for thumbnail, and the “Apply changes to:” choice is set to “thumbnail” before I hit save.  Finally, I select “update media” and WP takes me out of the editor and back to the media library.

    The thumbnail looks great, but…nothing changes in how XI displays my content.  I have purged my cache, and tried another browser so I am pretty sure that the reason nothing changes is that XI must be pulling image info for featured post thumbnails, etc. from something other than the thumbnail.  I have tried the thumbnail rebuild plug-in and that seems to flush out the changes I make in the WP image editor.

    Is this a CSS thing? I notice in one of my articles (http://cleantest.fishersofmen.org/?p=76), the lower image I have is listed in CSS as “alignleft size-thumbnail wp-image-77” Is it just a matter of getting the widgets to pull size-thumbnail and THEN scale? Just wondering. I am a coding no-body!

    CAN YOU HELP ME?  Thank you

    #1374

    themeweaver
    Keymaster
    Post count: 730

    Have you regenerated your thumbnails?

    Because Xi is not using the dreaded timthumb script it doesn’t create them on the fly.

    You can regenerate thumbnails in the media section individually or better, there is a plugin for regenerating all your thumbs. This is useful if you have moved to Xi from another theme and you need to regen old post images.

    It is mention in the theme docs, but here it is anyway: http://wordpress.org/extend/plugins/regenerate-thumbnails/

    #1375

    Fishers Church
    Participant
    Post count: 2

    Tim, I had rebuilt the thumbs with that plug-in. Unless I am just dumb, what I see as the result of running that plug-in is that all changes I have made to any image’s thumbnail are stripped out. I then went and manually rebuilt a few thumbnails. These show properly in the media library, and when posted to an article, and I chose thumbnail as size they come through as I cropped them. For some reason, it seems to me that the way XI is pulling the images for the mini-thumbnails in the posts and pages unit is not asking WP if there is already a designated thumbnail, and then re-sizing that.
    Am I making any sense?
    Tim, I am in love with the flexibility of this theme, and I really want this to work, please help. This seems to have “blown up” since I installed 1.6
    Here’s an example of a post that might illustrate this

    http://cleantest.fishersofmen.org/2011/man-to-man-an-evening-with-louis-zamperini/
    This is in the slider and looks great.
    It also has the same picture at the top of the article using the “post-image-head” custom field you provided
    Then the first image (aligned right) is the newest version of the thumbnail I recreated AFTER I upgraded to 1.6 and re-ran thumb rebuilder plug-in
    The second thumbnail (aligned left) is the curiousity to me. It is the thumbnail I designated when I first built the demo site (I think with XI 1.4). Even though I have run thumb re-builder twice, that image remains intact as formatted (you can tell it’s different than the aligned right one above it; shows the gentleman’s full head, while the first–newer–one aligned right crops to a square around his face.

    What’s going on? Why doesn’t XI use either of these for the mini-thumbnail on my home page.
    I am wondering,is it as simple as changing the coding of the widget to do what I see on the edit image-advanced settings-css class? That instruction reads “alignright size-thumbnail wp-image-77” Could you tinker with the widget to see if “size-thumbnail” makes any difference?

    Just wondering. Man, I need this to work! Thanks and blessings! Jerry

    #1376

    Fishers Church
    Participant
    Post count: 2

    My poke into the source code is showing that the theme is grabbing images that are 240px by 240px. Here’s a sample from the same picture:

    http://cleantest.fishersofmen.org/wp-content/uploads/hd_louzamp_speaking_8-27-2011-e1313631094764-240×240.jpg

    Like I said, I am a coding wannabe, but why that image and size? Why not code it so it grabs the designated WP thumbnail and scale or resize it as needed?

    Am I making any sense at all, St. Tim? I just don’t think that XI reaches it’s full potential of displaying posts and pages, if the user-designated thumbnail from within WP can’t be used.

    I want my site to look as great as your demo…say, how did you get your thumbs to look so great and get cropped to what you wanted? Were all of your images originally square in dimensions, even the slider photos?

    #1377

    themeweaver
    Keymaster
    Post count: 730

    Xi actually creates 4 thumbnails to be used in the different locations required.

    240×240 is only used in widgets

    These 4 line of code do the work in functions.php:

    add_image_size( ‘widget’, 240, 240, true ); //thumbs used in widgets
    add_image_size( ‘slider’, 1024, 480,true ); //slider image
    add_image_size( ‘single’,865, 486,true ); //single page/post header image
    add_image_size( ‘gallery’,512, 288,true ); //gallery images

    I think the issue you have on the individual post is that the ‘single’ image is not the same aspect ration as the dimensions used for the ‘slider’. This I think could be improved and will do. But you could try changing the 486 in ‘single’ to 405 and then regen the thumbs.

    WordPress is creating all these thumbnails when you upload the image or regen the thumbnails. See you wp-content/uploads folder to see.

    Your suggestion of generating thumbs on the fly is unnecessary and not good. This is how old themes do it and rely on the timthumb script. The theme creates images of appropriate size for each situation. The theme is responsive it is a little more complicated.

    BUT it is almost impossible to have the same aspect ratio for all images. The widgets use square images and while other images are not.

    You do have take care when creating images to anticipate crops etc. But I don’t tend to have the single post image switched on, and I’ll have different images for feature slide than those used in widget thumbs.

    You could experiment with the image sizes in functions.php if you wanted. I have jest created a child them that makes the widget show rectangular rather than square images.

    Hope all this helps.

    #1380

    Fishers Church
    Participant
    Post count: 2

    Tim:

    I will play with this as you suggest. I think I am grasping what you are saying. Sorry for my wrong wording about thumbnails done on the fly.

    I guess my brain is running into one wall, though. If I create a quality, wide photo for a featured image (so it looks good in slider), WP default is to create all the sub images of the varying sizes from the center of that original image. WP gives the opportunity to go in and edit the image–in my case cropping it. It appears that I have three choices in WP: crop all sizes, crop thumbnail only, crop everything except thumbnail. Since I haven’t wanted to ruin my original wide upload, I’ve been selecting thumbnail only.
    I guess what I wonder is if in your code
    add_image_size( ‘widget’, 240, 240, true ); //thumbs used in widgets

    could you experiment with changing that to 240, 240 to “thumbnail”?

    It seems to me that your widget would then pull whatever portion of the original image that the user has designated as thumbnail.

    If you notice in my featured slider, I often desire to have a large image on one side with ad copy-type text on the other. Taking a center-only approach to thumbnails won’t help me.
    A last way to say it, if WP gives me the built-in ability to designate what part of my image is a thumbnail, why can’t XI be tweaked to just say, “If you want that to be your thumbnail for this post or page, so be it!”? Thanks for everything! Jerry, Fishers Church

    #1382

    themeweaver
    Keymaster
    Post count: 730

    No because the user can change the default thumbnail size in WordPress settings which mess up the theme.

    The theme needs to be sure it has images bigger than max space for image, because it is responsive.

    There are limitations of all this, but then there always are!

    The thumb edit in WP does work if you update all thumbs, that’s how it meant to be used. Having a whole set of different thumbs cropped to different sizes/aspects is just a bit beyond WP right now.

    If you want different thumbs for posts to your feature slider. Use Features in yoru slider and use the redirect option in the feature to point to a post with a different image.

    #1383

    Fishers Church
    Participant
    Post count: 2

    Tim:

    Thanks for the reply. Now that the slider is available in the iphone-sized width, your suggest sounds workable.
    You wrote “The thumb edit in WP does work if you update all thumbs ” I wonder, if I tell WP to default thumbnails to 240 x 240, does that help XI use the cropped thumbnails I designate in WP to show up as the post/page teaser?

    #1386

    themeweaver
    Keymaster
    Post count: 730

    The size of your default thumb doesn’t matter. WP generates a thumb of each size based on the original image. It doesn’t matter what size your default WP thumb is, but editing the image with the WP editor and updating all thumbs will create new ones.

    #1431

    themeweaver
    Keymaster
    Post count: 730

    I have just discovered the most amazing plugin that will do all this for you, which WP currently simply does not do.

    http://wordpress.org/extend/plugins/regenerate-thumbnails/

    I have just been testing it out and it seems to work pretty well. But I think if you regenerate your thumbs at some point you would lose all your edits!

    #1443

    themeweaver
    Keymaster
    Post count: 730
Viewing 11 posts - 1 through 11 (of 11 total)

You must be logged in to reply to this topic.