• In the template for a “Single” page (“Enkel” in Dutch), I see the block for the featured image as a page-wide strip (hight:width = 1:6 approx). However, when I look at a page with a post, the entire image is shown.

    How can I get that featured image on top of the page, being only a strip?

    Help appreciated!

    • This topic was modified 1 year, 9 months ago by auitje.

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi @auitje the featured image for your posts are in different sizes, can you please upload them to the site after resizing them to your liking?

      You can use applications on your machine to resize the images, additionally, you can use other free online tools.


      Thread Starter auitje

      (@auitje)

      Just to make sure I understand correctly: it is not possible, then, to set a fixed size for the featured-image in the template and then for each new post, crop the image I selected to that size from within the WP-post editor?

      If that is correct, I would find that a real pity and hassle. Of course, I can crop images in tools outside WP – but having to go somewhere else for this, feels clumsy – let alone that now, I have to upload each image twice: once in the clipped format for the featured image on top of the post and another time for displaying the entire image when someone clicks on the image…

      • This reply was modified 1 year, 9 months ago by auitje.

      Hi @auitje It looks like folks have requested a better way to set how the featured image is displayed on the GitHub issue below:

      https://github.com/WordPress/gutenberg/issues/47274

      I have added your experience, you can follow the conversation to see what the developers say. In the meantime, I would suggest using CSS to change the height of the featured image. You can adjust the height to your preference.

      .wp-block-post-featured-image img {
          height: 500px;
          object-fit: cover;   
      }

      You can access the CSS editor by adding this after your URL /wp-admin/customize.php and visiting the Additional CSS panel.

      Thread Starter auitje

      (@auitje)

      Thanks. Your CSS addition seems to work: https://vm-nieuw.verhalenmaker.nl/2023/01/02/perspectief-en-punt/

      With three more questions:

      1. would it be possible to have the reader click on the featured image and link to the entire picture?
      2. is there a way that I could select the part of the picture that is displayed in this now fixed-size frame?
      3. I do see the featured image when previewing or after publishing, however, when I edit the post, I do not see it above the post? Is that correct behaviour?
      • This reply was modified 1 year, 9 months ago by auitje.

      Hi @auitje

      1. would it be possible to have the reader click on the featured image and link to the entire picture?
      2. is there a way that I could select the part of the picture that is displayed in this now fixed-size frame?

      It won’t be possible to do the above, maybe you can find a plugin that you can use to achieve this.

      However, instead of using the Post Featured Image block on your post templates, you can add a cover block to the top of each post. The cover block allows you to adjust the image height and pick which area on the image you want to be displayed but you still can’t link it to the full image.

      I do see the featured image when previewing or after publishing, however, when I edit the post, I do not see it above the post? Is that correct behaviour?

      That is the expected behaviour, the featured image for posts and pages cannot be viewed when editing the post.

      Thread Starter auitje

      (@auitje)

      Thanks, that might work. However…

      I replaced the Post Featured Image in the Single-template by a Cover Image. I could select ‘link to featured image’ – but now, a few clicks further, I cannot re-find that selection. Can you help me find it?

      And, although I replaced it, I cannot edit the cover block for specific posts. Maybe that is because I linked it to the featured image?

      I could select ‘link to featured image’ – but now, a few clicks further, I cannot re-find that selection. Can you help me find it?

      When you add the cover block you have the option to upload an image, use one from your media library , or use the featured image. I believe that’s when you saw this.

      And, although I replaced it, I cannot edit the cover block for specific posts. Maybe that is because I linked it to the featured image?

      My apologies for not being clear, if you use the Cover Block option you have to add it to your posts, not the single template.

      1. Remove the Post Featured Image or Cover block from the single template
      2. On each post add the Cover block
      Thread Starter auitje

      (@auitje)

      Thanks, getting there, I think. Still, I have the question if the cover image can be clickable, so the entire image can be shown?

      Still, I have the question if the cover image can be clickable, so the entire image can be shown?

      It won’t be possible to link the cover block to the full image, you can check featured image plugins achieve what you want.

    Viewing 9 replies - 1 through 9 (of 9 total)
    • The topic ‘How to crop featured image?’ is closed to new replies.