Reply To: Avoid using original image for featured header image?

Home Forums Support Avoid using original image for featured header image? Reply To: Avoid using original image for featured header image?

Home Forums Support Avoid using original image for featured header image? Reply To: Avoid using original image for featured header image?

#203994
Samuel

I can’t get it to work.

This is what I’ve done:

In my child functions file, I have added

/* Ask GeneratePress to use custom size instead of full size in header/featured image */
// Create header size
add_image_size( 'DFX-Header', 1100, 1100, false ); // false = scaled, true = cropped
// Use the header size
function dfx_change_page_header_size()
{
  return 'DFX-Header';
}
add_filter( 'generate_page_header_default_size','dfx_change_page_header_size' );

I have regenerated the thumbnails.

And it is still the original image that is used in the page header (featured image above the title).

HTML code:


<div class="page-header-image grid-container grid-parent generate-page-header">			
<img width="2816" height="1584" src="http://www.doucheflux.be/wp/wp-content/uploads/top.jpg" class="attachment-full size-full" alt="top" itemprop="image" srcset="http://www.doucheflux.be/wp/wp-content/uploads/top.jpg 2816w, http://www.doucheflux.be/wp/wp-content/uploads/top-320x180.jpg 320w, http://www.doucheflux.be/wp/wp-content/uploads/top-1024x576.jpg 1024w, http://www.doucheflux.be/wp/wp-content/uploads/top-400x225.jpg 400w" sizes="(max-width: 2816px) 100vw, 2816px" />				
</div>

I can’t show you the page, as it’s not public.