Tagged: cropping, featured image, single post, sizing
-
AuthorPosts
-
June 15, 2021 at 5:13 pm #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
June 17, 2021 at 7:29 am #1306127Hey 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,
IsmaelJune 18, 2021 at 5:26 pm #1306429Hello 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?
June 20, 2021 at 9:44 pm #1306607Hi,
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,
IsmaelJune 20, 2021 at 11:06 pm #1306625Thanks, 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?
June 22, 2021 at 4:41 am #1306845 -
AuthorPosts
- You must be logged in to reply to this topic.