How To Customize Featured Image Size
#1
Posted 24 October 2012 - 01:14 PM
I've been trying to find a workaround for this, so far unsuccessfully...
My client wants all the Featured Images in Blog Index and Single Post pages to be the same width and height, which means the have to be cropped in many cases.
I've tried achieving this with the wordpress featured image settings, the pagelines settings and CSS but haven't been able to fully achieve it.
if you check the blog index page here: , you will see that the images are cropped but the surrounding frame or border doesn't display properly (at the bottom edge of pic).
I've tried many variations of CSS and targeting the different divs for the image and frame, etc... but haven't found a way to do this properly.
My code at the moment is fairly simple:
I appreciate your help!
#2
Posted 24 October 2012 - 03:01 PM
#3
Posted 24 October 2012 - 04:23 PM
Have you tried changing max-height to height to see if that makes a difference?
Just tried it... same exact result... any other thoughts? Thanks.
#4
Posted 24 October 2012 - 04:48 PM
#5
Posted 24 October 2012 - 04:56 PM
There should be other CSS generating that box for the image. Did you create that CSS or is it using the WordPress default?
That CSS is a pagelines default. Not wordpress, and not me...
These are the classes I've tried targeting:
- The image: - The surrounding span: - The "a" class around that: - The "div" around all of the above:
And I've yet to find the right code in order to crop the images at the bottom without screwing up the frame at the bottom...
B
#6
Posted 24 October 2012 - 08:59 PM
The only problem is when the featured image is "tall" then it gets distorted by the second instruction. But without the second instruction, the frame and border at the bottom get screwed up...
Like I said, close, but no joy just yet...
You can check what it looks like with a tall picture over here:
#7
Posted 25 October 2012 - 12:12 AM
#8
Posted 25 October 2012 - 12:26 AM
The problem now is that the image (which is originally a tall one) is being distorted due to the height instruction for span.c_img
But including that instruction is the only way to prevent the bottom border of the frame from getting cut off.
Maybe an easier way to do this would be modifying the php file for the single post?
#9
Posted 25 October 2012 - 08:46 AM
OK what you can do is do this little trick here, basically this will keep your image at the same size but hide any overflow from the max-height you set.
http://d.pr/i/uUME
#10
Posted 25 October 2012 - 01:14 PM
Hi,
OK what you can do is do this little trick here, basically this will keep your image at the same size but hide any overflow from the max-height you set.
Hi Danny, thanks for the tip. The thing is the client wants all featured images to be the same width as well. Any add-on code to the above to accomplish this?
I would really like Pagelines framework to have better Featured Image handling settings... the Wordpress Media settings are worthless, I've never managed to get those to work...
In the Wordpress Media settings I have it set up correctly to 614px x 290px AND with crop enabled, but those settings don't seem to do anything at all!?!
Thanks again
#11
Posted 26 October 2012 - 03:51 PM
#12
Posted 26 October 2012 - 04:10 PM
#13
Posted 27 October 2012 - 11:07 AM
I'm trying to see if it's an issue with the image cropping or if it's the border around that is causing the problem. It's difficult to say which!
It's definitely the code I'm using to faux crop the image.
The way that border works is like this:
- there's a setting somewhere in pagelines to add a frame to the features images. I enabled that.
- as for CSS structure, pagelines puts the featured image inside a span or div I believe, and gives that div a background color, 1 pix border and 4px padding (so you can see that background color peek around the pic as a frame).
So, it's definitely my code... Which is why I need help figuring this out...
I really wish there were more comprehensive settings in pagelines for handling size and cropping of featured images....
#14
Posted 28 October 2012 - 10:01 AM
#15
Posted 29 October 2012 - 09:11 PM
The problem is that all your images have different sizes as far as I can see, for both width and height. The only way for the Featured Image on your posts to have the same height and width is to edit these images so they have the same dimensions. If you were to do this with CSS, the images would become distorted and look odd.
What I'm trying to do is no different than what Pagelines does when it displays the square thumbnails in the excerpts... Pagelines doesn't distort the images when it does that, it just shows a portion of the image, and the rest is hidden.
That's what I'm trying to replicate with the featured image...
It would be super useful to add more control in the Pagelines settings for the size, cropping and handling of featured images and thumbnails in excerpts and in the single post layout...
Let me know if you can think of any suggestions on how to handle this...
Thanks
#16
Posted 30 October 2012 - 04:56 AM
#17
Posted 30 October 2012 - 09:56 AM
Well you're using the option "On Top". The "On Top" option uses the full image and not thumbnails. That is why your dimension changes have not had any effect.
What I suggest is, for you to not use the "On Top" but one of the other options and use custom CSS to resize the thumbnail.
#18
Posted 01 November 2012 - 03:55 PM
What I suggest is, for you to not use the "On Top" but one of the other options and use custom CSS to resize the thumbnail.
I'll try that and report back! I may just be able to make that work...
Thanks for the suggestion.
Beny
#19
Posted 04 November 2012 - 11:44 AM
#20
Posted 06 November 2012 - 03:56 PM
When using CSS to resized the image it distorts it again. The only way at the moment to achieve the effect I want is to edit the images offline and re-size and crop them to the exact sizes I want, in combination with CSS.
But if I just want to upload the image to wordpress and have it simply display a 614px by 290px portion of it (the same way Pagelines does at 150x150) i won't work...
Pagelines really needs better settings and control for Featured Image and Thumbnail size...
Thanks
Also tagged with one or more of these keywords: Resolved, featured image, crop, auto, size, customize, blog index
PageLines Framework →
Customizations →
Carousel Thumbnail ProportionStarted by ratputin , 21 May 2013 |
|
|
||
PageLines Framework →
Customizations →
Customizing the Wordpress EditorStarted by rpacker , 12 May 2013 |
|
|
||
PageLines Framework →
Customizations →
Where is the CSS page to customize?Started by webgirl2013 , 05 Apr 2013 |
|
|
||
Changing Font Type In Categories and SidebarStarted by mason , 26 Mar 2013 |
|
|
||
Change Content Width OnlyStarted by dmgusa , 12 Mar 2013 |
|
|











