Site logo

Archived topic

featured post image size

9 replies · Started by Achim on February 4, 2016

Viewing posts 1–10 of 10

On http://demo.generatepress.com/2015/02/25/post-with-featured-image/ the code for the featured post image looks like this:

img width="1920" height="839" sizes="(max-width: 1920px) 100vw, 1920px" srcset="http://demo.generatepress.com/wp-content/uploads/2015/06/blog6-300x131.jpg 300w, http://demo.generatepress.com/wp-content/uploads/2015/06/blog6-1024x447.jpg 1024w, http://demo.generatepress.com/wp-content/uploads/2015/06/blog6.jpg 1920w" itemprop="image" alt="blog" class="attachment-full size-full" src="http://demo.generatepress.com/wp-content/uploads/2015/06/blog6.jpg" scale="0"

which means that the largest image is been loaded to show up on the frontend at any time. What I want is to only load the medium size image to be used as post thumbnail. How do I do this?

Thank you.

To disable the responsive image 'srcset' on WordPress 4.4 This one works fine for me.

function disable_srcset( $sources ) {
    return false;
}
add_filter( 'wp_calculate_image_srcset', 'disable_srcset' );

Awesome, thanks for sharing! :)

Man, I'm having a problem related to that on my blog. I tried with many codes but now I give up. I'll give you an example straight from the html:

<div class="page-header-image-single grid-container grid-parent">
		<img width="4436" height="2890" src="http://rediscoveringtheworld.com/wp-content/uploads/2016/05/ballestas-islands-2.jpg" alt="ballestas islands" />	</div>

I'm not using a page header. Even though, every post as the one above (http://rediscoveringtheworld.com/paracas-peru/) is loading the full resolution image of the featured image selected. I simply can't take this part out and it's making my site to load very slow for that as tested in a page speed site. As I can't choose the size of the featured image when selecting it at the moment I create a post, do you have any clue?

The Page Header add-on allows you to set a size using the crop feature.

However, you can also hide that image and add your own in your content with this CSS:

.page-header-image-single {
    display: none;
}

Adding CSS: https://generatepress.com/knowledgebase/adding-css/

Let me know if you need more info :)

Actually, I do have Page Header add-on, but can't seem to find this feature. My version of GP Premium is 1.2.81, because the last one won't work with my server.

I have already tried to use this CSS code, but somehow it doesn't seem to have any effect, as I don't use any page header.

Just to make sure, I currently have the Post Image/Page Header disabled in each post, what I want is no to load the Featured Image at full size. When I look to the visible part of the page, I can't see the Featured Image, but it's loaded within the HTML.

Wow, how could I never noticed this Hard Crop function before, there it is my solution! Thanks a lot!

You're welcome :)

This archived topic is closed to new replies.