Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #90782
    Markus
    Participant

    If a post has his own picture, I can use this in the header also.

    But what happen if these pictures has totaly other dimensions as the header picture? Then you have these big picture in the header….so this makes no sense.

    My question: Is there a automatic way to crop this picture into the same dimension as the standard header picture? I don’t like to upload 2 versions of a picture (one for the post, one for the header…)

    #90790
    Pratik
    Keymaster

    Hi @Markus,
    Can you go to Appearance=> Customize=> Header Image and under Page/Post Featured Image Size select Full Width Slider Image. This should keep the image size of the page post featured image as header image.

    Let me know how it works.

    Regards,
    Pratik

    #90797
    Markus
    Participant

    Hi Pratik,

    width is clear, my problem is the height.

    Regards,
    Markus

    #90837
    Pratik
    Keymaster

    Hi @Markus,

    If that is the case, then you need to do a bit of customization via child theme. For that , first Create a child theme. Details for child theme are here.

    Then in your child theme’s functions.php add the following codes.

    
    function catchflames_child_manage_image_size() {
        remove_image_size( 'featured-slider-full' );
        add_image_size( 'featured-slider-full', 1600, 400, true );
    }
    add_action( 'init', 'catchflames_child_manage_image_size' );
    

    Then use Regenerate Thumbnails plugin once to generate thubmnails. You can visit this link for the plugin: https://wordpress.org/plugins/regenerate-thumbnails/

    Regards,
    Pratik

    #90838
    Pratik
    Keymaster

    Note: This will change the size of Slider image if Full Width Slider is used too.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Automatic crop of a picture from a post to use these as header’ is closed to new replies.