September 13, 2011 at 6:18 pm #1371
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 youSeptember 13, 2011 at 8:51 pm #1374
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/September 14, 2011 at 4:18 pm #1375
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
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! JerrySeptember 14, 2011 at 7:15 pm #1376
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:
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?September 14, 2011 at 8:40 pm #1377
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.September 15, 2011 at 4:28 pm #1380
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 ChurchSeptember 15, 2011 at 5:29 pm #1382
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.September 15, 2011 at 7:59 pm #1383
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?September 16, 2011 at 7:02 am #1386
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.September 22, 2011 at 8:12 pm #1431
I have just discovered the most amazing plugin that will do all this for you, which WP currently simply does not do.
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!September 22, 2011 at 8:40 pm #1443
You must be logged in to reply to this topic.