[Resolved] GP 2: Featured image on archives page resizing

Home Forums Support [Resolved] GP 2: Featured image on archives page resizing

Home Forums Support GP 2: Featured image on archives page resizing

  • This topic has 14 replies, 1 voice, and was last updated 3 years ago by acela.
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #463148
    xdaniel

    Hello Tom,

    I ran into trouble resizing the featured image on the blogs page. When I enter height 400 and width auto, the image is absolutely mini.

    How can I set the height in archive pages to a fixed value?

    As you suggested in another thread, I disabled photon temporarily, but had no success.

    Best, Daniel

    Screenshot: https://celtic-rock.de/wp-content/uploads/2018/01/gp2-resize.jpg

    #463280
    Leo
    Staff
    Customer Support
    #463297
    xdaniel

    Hello Leo,

    please have a look on my Screenshot above. I rolled it back, because this doesn’t look really nice and the page is online …

    Best, Daniel

    #463298
    Leo
    Staff
    Customer Support

    Yes I saw the screenshot but it’s hard to tell what the problem is without seeing it live – especially we haven’t had others reported this issue.

    Does it only happen in customizer mode?

    #463299
    xdaniel

    ok, I’ll make it live for some minutes, …

    #463301
    xdaniel

    ok, seems to be a customizer problem. But now I don’t have the full width?

    Is there a way to crop to 100% width and 400 height?

    #463306
    xdaniel

    Better explanation: Screenshot

    #463369
    Leo
    Staff
    Customer Support

    Hmm then your picture would be stretched and lose the original ratio?

    #463907
    xdaniel

    ok, then I leave it as it is.

    I had in mind, that there is a css-soultion to set a height and cut off the rest of the image…

    #463918
    Leo
    Staff
    Customer Support

    One alternative would be to crop the picture to the exact size you want it so that it’s 400px height and whatever width to fill the space.

    #464095
    xdaniel

    I tried this, but it didn’t really help:

    .post-image img {
    	max-height: 450px;
    	max-width: 100%;
    	overflow: hidden;
    }
    #464193
    Leo
    Staff
    Customer Support

    You can’t set both max-height and max-width as it isn’t very logical.

    I think in your case cropping the picture or using WordPress edit media will be the way to go.

    #464336
    xdaniel

    ok, this seems to work:

    
    /* for the archive pages */
    .post-image img {
      width: 100%;
      overflow:hidden;
      max-height: 480px;
    }
    
    /* for the post */
    .post-image-above-header .no-featured-image-padding .inside-article .featured-image {
      max-height: 480px; 
      overflow:hidden;
    }

    I combined it with the plugin Minimum Featured Image Size to force my authors in the future to use better images. Maybe somethings that could be integrated into GP?

    #464552
    Leo
    Staff
    Customer Support

    This is actually the first time someone request this so I don’t think it’s worth adding it in it.

    Most people are happy with the cropping we provide in the customizer.

    Glad you found the solution though!

    #1686794
    acela

    Thanks for sharing this. I’m trying to limit the dimensions of the featured images to a maximum width and maximum height (i.e., constrain without cropping) using pure CSS and had an idea on how to do it, but it doesn’t work out in all cases.

Viewing 15 posts - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.