- This topic has 14 replies, 1 voice, and was last updated 3 years ago by acela.
-
AuthorPosts
-
January 4, 2018 at 8:50 am #463148xdaniel
Hello Tom,
I ran into trouble resizing the featured image on the blogs page. When I enter height 400 and width auto, the image is absolutely mini.
How can I set the height in archive pages to a fixed value?
As you suggested in another thread, I disabled photon temporarily, but had no success.
Best, Daniel
Screenshot: https://celtic-rock.de/wp-content/uploads/2018/01/gp2-resize.jpg
January 4, 2018 at 12:12 pm #463280LeoStaffCustomer SupportHi there,
Looks fine to me? https://s18.postimg.org/juj05hn61/2018-01-04_1211.png
January 4, 2018 at 12:35 pm #463297xdanielHello Leo,
please have a look on my Screenshot above. I rolled it back, because this doesn’t look really nice and the page is online …
Best, Daniel
January 4, 2018 at 12:37 pm #463298LeoStaffCustomer SupportYes I saw the screenshot but it’s hard to tell what the problem is without seeing it live – especially we haven’t had others reported this issue.
Does it only happen in customizer mode?
January 4, 2018 at 12:38 pm #463299xdanielok, I’ll make it live for some minutes, …
January 4, 2018 at 12:43 pm #463301xdanielok, seems to be a customizer problem. But now I don’t have the full width?
Is there a way to crop to 100% width and 400 height?
January 4, 2018 at 12:50 pm #463306xdanielBetter explanation:
January 4, 2018 at 2:54 pm #463369LeoStaffCustomer SupportHmm then your picture would be stretched and lose the original ratio?
January 5, 2018 at 8:50 am #463907xdanielok, then I leave it as it is.
I had in mind, that there is a css-soultion to set a height and cut off the rest of the image…
January 5, 2018 at 8:56 am #463918LeoStaffCustomer SupportOne alternative would be to crop the picture to the exact size you want it so that it’s 400px height and whatever width to fill the space.
January 5, 2018 at 1:49 pm #464095xdanielI tried this, but it didn’t really help:
.post-image img { max-height: 450px; max-width: 100%; overflow: hidden; }
January 5, 2018 at 6:18 pm #464193LeoStaffCustomer SupportYou can’t set both
max-height
andmax-width
as it isn’t very logical.I think in your case cropping the picture or using WordPress edit media will be the way to go.
January 6, 2018 at 2:20 am #464336xdanielok, this seems to work:
/* for the archive pages */ .post-image img { width: 100%; overflow:hidden; max-height: 480px; } /* for the post */ .post-image-above-header .no-featured-image-padding .inside-article .featured-image { max-height: 480px; overflow:hidden; }
I combined it with the plugin Minimum Featured Image Size to force my authors in the future to use better images. Maybe somethings that could be integrated into GP?
January 6, 2018 at 9:20 am #464552LeoStaffCustomer SupportThis is actually the first time someone request this so I don’t think it’s worth adding it in it.
Most people are happy with the cropping we provide in the customizer.
Glad you found the solution though!
March 8, 2021 at 7:00 am #1686794acelaThanks for sharing this. I’m trying to limit the dimensions of the featured images to a maximum width and maximum height (i.e., constrain without cropping) using pure CSS and had an idea on how to do it, but it doesn’t work out in all cases.
-
AuthorPosts
- You must be logged in to reply to this topic.