Featured Image Cropping

This topic contains 2 replies, has 2 voices, and was last updated by  Alex Rollin 4 years, 1 month ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #536995

    Hayley Kirkman
    Expired Member
    Post count: 37

    When a user uploads images that are wider than they are tall the cropping of the images is as desired see attached image “horizontal.png”.

    However; when a user uploads an image that is tall and narrow see attached image “vertical.jpg” the default cropping zooms in very tight on the image causing a lot of it to be cropped out of frame see attached “crop.png”.

    Is there any way to change a setting so that the image is never cropped and always kept within the default horizontal oriented frame? See attached “correct.png”.

    #537000

    Hayley Kirkman
    Expired Member
    Post count: 37

    I actually believe I found a solution to this. Is this a viable option? Everywhere I test it with both wide and tall images the image is scaled down rather than being cropped. I read one of the other support posts stating that the image was not actually being cropped. Just being viewed through a small view port omitting the rest of the image. That is where this solution came from.

    CSS: I changed the “Object-Fit:” to scale-down

    .geodir-image-container ul.geodir-images li img {
    border-radius: 4px;
    object-fit: scale-down;
    height: 100%;
    }

    #537018

    Alex Rollin
    Moderator
    Post count: 27815

    You may find your custom CSS to work.

    GD Post Images has an advanced option to adjust the object-fit CSS property.

    I think you want to try “contain” instead of cover:

    
    
    
    cover="n"
    
    
    
    
    [gd_post_images type="image" ajax_load="1" slideshow="1" show_title="1" animation="slide" controlnav="1" link_to="post" cover="n"]
    
Viewing 3 posts - 1 through 3 (of 3 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket