- This topic has 5 replies, 2 voices, and was last updated 3 years, 8 months ago by Leo.
February 5, 2018 at 11:38 am #488720James
Hi GP Team,
I apologize as I’ve read all the suggested posts for what I think I want to accomplish but not being intuitive enough to understand them all my fear is I’m about to ask you something that has already been answered … so apologies in advance.
What I would like to aim to do is have my featured image on single page blog posts appear above the title of the post with a height of 250px and width to essentially stretch the the container width.
What I attempted to do was set the value for height in custom size in the customizer and leave the width blank but it seems to still not stretch the image the full width to line up with the width of the blog post section (to the left of the sidebar)
I have provided a link below to another post on another site to show you what I’m trying to achieve and hoping you might be able to guide me on how to create the same image effect on WPP (note the link provided is not the page generated on WPP).
I am not using headers as an fyi.
Thank you in advance for your guidance.
JamesGeneratePress 2.0.2GP Premium 1.5.6February 5, 2018 at 3:23 pm #488911LeoStaffCustomer Support
I think you were on the right track 🙂
If you leave the width blank then the image editor will automatically scale the number down according to the set height, which will only work if your original image is a long horizontal rectangle.
You could try setting a height and a width that’s just a bit bigger than your content container width, location to above title, alignment to center then uncheck display padding around image:
However WordPress would automatically crop image for you and the focus might be off.
I would say the best way is to crop the image before you upload OR using WordPress editor afterwards so it’s already exactly how you want it (width/height/focus), then it should make everything look good:
https://codex.wordpress.org/Edit_MediaFebruary 5, 2018 at 11:22 pm #489120James
Hi Leo thanks I’m not sure what exactly I’ve done but it seemed to work.
I assume if I have set a height of 350px and the image I’ve loaded is something like 2500 x 1000 the image is somehow scaling down on it’s own to the correct height not sure though how the width is working itself out but it seems to work????
Not really a solution but I don’t mind stumbling into something that works I guess.
Just wish I understood what was going on.
Thanks Leo!February 6, 2018 at 8:17 am #489540LeoStaffCustomer Support
That just means that your picture is still wide enough after scaling down.
If you only specify one criteria then it’s scaling/re-sizing, when both width and height are specified then it’s cropping.
See more explanation here: https://codex.wordpress.org/Edit_Media#Edit_Media_PageFebruary 6, 2018 at 8:47 am #489589James
Thanks Leo much appreciated … and thank you for your patience with me I’m certain I will have a few more questions. Have a great day!February 6, 2018 at 9:02 am #489614
- You must be logged in to reply to this topic.