Untitled Theme: Max Height of Featured Post Picture
-
While working through some issues with this theme, I’ve run into one that I’m very confused about. The Featured Post picture crops at a height of 400, this is problematic as the 1000×400 ratio is not the same as the ratio used to display the thumbnails of the Featured Post pictures on the front page (300×168).
I’m not sure what is causing the crop, but in looking at the page source, there are entries that have a “crop=1” tacked onto the img src tags.
While I could load 2 copies of each featured post picture (one for slider, one for front page) I’d much prefer to adjust the height of the slider to a max of 560. This would allow the pics to be loaded at 1000×560 for the slider and then to be properly scaled down to 300×168 when on the front page.
I’ve checked the CSS as best I can, but I’m not having any luck finding where to adjust the attribute. Any suggestions would be welcome. :)
The blog I need help with is: (visible only to logged in users)
-
Hello,
First of all, so the goal here is to match the slider image ratio with the featured post image ratio.
You can use the following CSS to ‘force’ the slider height to be 560:
.flexslider .slides img { width: auto; height: 560px; }The one problem here is that the theme is hardcoded to display slider image of 1440 x 400 pixels. The ‘crop=1’ code tells WordPress to display crop your image into that size, even though the original picture is 1000 x 560 pixels.
Now, I am not sure how the output will be, but I predict that the image will be scaled up a bit (from 400 to 560) and so lose a bit of sharpness.
Try adding the above CSS then upload your 1000x560px featuread image, and see what happens.
-
Why in the world would something like the size of the slider be hardcoded into the HTML part of the theme instead of being placed in the CSS? Part of that is an actual question, and part of that is being amazed that such a basic display element would be shifted out of CSS.
Your fix did “work” in that it forced the picture to scale to 560px high. I dont consider it successful though because it scaled both horizontally and vertically which it didnt do if I uploaded at 1000×400 (youd need to look at what Im trying to do to understand.
Unless there is a work around, the best bet seems to be to load the pics in at 1000×400 and compose them ahead of time with the understanding that they will crop when thumbnailed on the first page.
Thanks for taking a look, I sincerely appreciate it!
-
Why in the world would something like the size of the slider be hardcoded into the HTML part of the theme instead of being placed in the CSS?
Just a guess on my part, but when you’re making themes that will be used by many people, you can’t always be sure what’s the dimension of the pictures uploaded. So to be safe, the theme developers opt to force crop it instead.
The ratio difference between the slider and featured image is probably an aesthetical decision.
Unless there is a work around, the best bet seems to be to load the pics in at 1000×400 and compose them ahead of time with the understanding that they will crop when thumbnailed on the first page.
I agree with that.
-
- The topic ‘Untitled Theme: Max Height of Featured Post Picture’ is closed to new replies.