Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1305861

    On a staging server I’m trying to create a new version of our website for a roadrunning club. Again I’m struggling with the featured images. Most of our posts contain pictures with running or standing people. I would prefer to use one of these pictures as featured image for that post. With both options in Enfold this works so bad that I wonder if I missed something. Am I using Enfold the wrong way?

    Both options not only resize, but also crop the image. What is the idea behind this? The only situation I can imagine this to work is a shop for carpets, wallpaper or other stuff with a repeated pattern where any portion of the image tells the story….

    With the “small preview image” setting the left and right part is cut of to get a small 1:1 aspect ratio image. You’re very lucky if that displays a recognizable “summary” of the picture.

    With the “big preview image” setting most people get (part of) their head and feet cut off. Again: you’re very lucky if the essential part of the photo is in a narrow band vertically in the middle of it.

    The size is something like 839 x 315 pixels, so roughly 8:3 ratio. The photo’s we receive have many different aspect ratios: 21:9 (recent Android phones), 16:9, 3:2, 4:3… But never 8:3!

    I think I would prefer to have the featured image centered on top the post, but resized to a height of something like 300 px, but not cropped. Is there a setting to achieve this? Or do I need custom CSS (what I always try to avoid as much as possible)?

    A related question: images opening in Lightbox, I like that very much, but I would keep the featured image out of that, because it is already in the post and this makes it appear twice in the Lightbox slideshow.

    • This topic was modified 3 years, 5 months ago by willemb2. Reason: misplaced link
    #1306127

    Hey willemb2,

    Thank you for the inquiry.

    The theme automatically generates a thumbnail called “entry_without_sidebar” for single posts and the thumbnail has a maximum size of 845x321px. You can adjust it by editing the functions.php file directly or with the following plugin.

    // https://wordpress.org/plugins/simple-image-sizes/

    You can adjust and regenerate the thumbnails in the Settings > Media panel. The plugin is a bit old but it still works well.

    Best regards,
    Ismael

    #1306429

    Hello Ismael,

    Using that plugin I have changed Cropping from Yes to No for entry_with_sidebar. That works as such, but now it doesn’t respect the maximum height of 321 px anymore. With an original of 1920 x 1440 (4:3) the result is: height: 625.267px; width: 843.3px; (link to example in private content section).

    I want to prevent cropping, but still limit the height. In other words: make it fit within a 845x321px rectangle. How can I achieve that?

    #1306607

    Hi,

    Have you tried adjusting the dimension of the thumbnail? You should also add this css code to prevent the theme from stretching the featured image or to prevent it from inheriting the width of the content container.

    .big-preview.single-big a img {
    	width: auto;
    }

    Best regards,
    Ismael

    #1306625

    Thanks, Ismael, that does the trick! I had to adjust the dimensions once more after adding that CSS and regenerate thumbnails. Now I get want I was looking for…. almost: they align left now. I think I want to have them centered horizontally. What do I need to add to that CSS?

    #1306845

    Hi,

    Glad to know that it is working. Regarding the image alignment, you can replace the css with this one.

    .big-preview.single-big a img {
        width: auto;
        margin: 0 auto;
    }
    

    Best regards,
    Ismael

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