Tagged: blog posts, featured image
-
AuthorPosts
-
May 4, 2016 at 10:15 pm #627526
Hi,
What is the correct dimension for the featured blog post image?
Example of what I uploaded – http://1c5.964.myftpupload.com/wp-content/uploads/2012/01/equity-1.jpg
How it appears on the top of my blog post – http://1c5.964.myftpupload.com/2012/01/bccp-equity-by-design-6th-annual-dml-conference-in-los-angeles/
How it appears on the blog grid page – http://1c5.964.myftpupload.com/blog/blog-grid/
On the blog grid page, it is fine but on the top of my blog post, it is cut off.
Can you please provide some insight on what is the correct dimension of featured image on blog posts?
Thanks
May 5, 2016 at 2:46 pm #627841Hey navindesigns!
You can add following code to Functions.php file of your child theme in Appearance > Editor
add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 ); function enfold_customization_modify_thumb_size( $size ) { $size['entry_with_sidebar'] = array('width'=>845, 'height'=>321); $size['portfolio'] = array('width'=>495, 'height'=>400); return $size; }
Adjust them as needed Then regenerate thumbnails using this plugin – https://wordpress.org/plugins/regenerate-thumbnails/
Regards,
YigitMay 7, 2016 at 4:49 pm #628630@Yigit
I want full feature image to be display in post page. Currently it is showing image of dimension – 845×321 .
Please let me know if there is any concern.Thanks!
May 7, 2016 at 6:25 pm #628645Hi,
Thanks for getting back to us!
In the code snippet Yigit provided above you need to change the height and width to the value you want. Currently it is 845×321 which is why the images have those dimensions. Please follow the instructions he gave to place the code in the Child theme and change the values.
Best regards,
JordanMay 7, 2016 at 6:55 pm #628656@Jordan
I understand that changing dimension will change dimension of “feature image” in post. But if I would be having different dimension feature image for different post, then setting one dimension would not work in all post. That’s why instead of having fixed dimension image in post I want to show full image on post page . By dong this I will be having all post with full image. By full image I mean that image with max-width and height as auto so that full image would get visible in post.Please let me know if there is any confusion.
Thanks!
May 7, 2016 at 7:20 pm #628671Hi,
Ok now I understand :)
Try replacing the numerical values there with ‘auto’. Note that the ‘auto’ is a string, so the single quotation (‘) needs to surround the ‘auto’ string. Let me know if that helps.
Best regards,
JordanNovember 16, 2019 at 5:01 pm #1157507Hi, what is the current – November 2019 – default featured image size?
November 20, 2019 at 1:51 pm #1158472Hi Jacopotj,
They remain the same. Please have a look here:
https://kriesi.at/support/topic/full-list-of-image-dimensions-for-enfold/#post-373563If you need further assistance please let us know.
Best regards,
VictoriaAugust 22, 2021 at 12:06 pm #1317814Dear All,
I’ve reviewed this thread, but still don’t understand: In the code that Yigit provides it specifies the thumb size. I don’t want to modify the thumb size; only the featured image on the blog post.
What is final code to add to the functions.php file to make the Featured Image appear as a proportionate full size on a blog post?
Please advise.
Thank you,
TimPS It looks like there is a span with a class name ‘image-overlay’ that is masking the image. ? Could the fix be to remove this?
August 22, 2021 at 2:58 pm #1317823I’ve tried the following code:
add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 ); function enfold_customization_modify_thumb_size( $size ) { $size['featured_large'] = array('width'=>'auto', 'height'=>'auto'); return $size; }
No luck. Link to what I am seeing below.
I’ve also tried the following CSS:
/*Resolve cropping of featured image on blog post*/
#main > div.container_wrap.container_wrap_first.main_color.fullsize > div > main > article > div.big-preview.single-big > a > span.image-overlay.overlay-type-image {
display: none !important;
}August 22, 2021 at 3:31 pm #1317829Dear All,
The more I look for solutions, the more I find it hard to believe that there isn’t a simple option in the ‘blog layout’ section to ‘show featured image as a responsive full size’. ?
Also, here https://kriesi.at/support/topic/full-size-featured-image-in-single-blog-page/ it says:
“You can actually modify the includes > loop-single.php file in your child theme to override the default thumbnail settings. Just look for this code around line 66:*/ $size = strpos($blog_style, 'big') ? (strpos($current_post['post_layout'], 'sidebar') !== false) ? 'entry_with_sidebar' : 'entry_without_sidebar' : 'square';
Set the default thumbnail sizes from “entry_with_sidebar” and “entry_without_sidebar” to “full” or “extra_large”.”
BUT, in my includes directory, there isn’t any file named loop-single.php. ?
August 25, 2021 at 5:29 am #1318209Hi,
Sorry for the confusion. The name of the file is actually loop-index.php and not loop-single.php file. It should be located in the includes folder. Look for this code around line 90.
$size = strpos( $blog_style, 'big' ) ? ( ( strpos( $current_post['post_layout'], 'sidebar' ) !== false ) ? 'entry_with_sidebar' : 'entry_without_sidebar' ) : 'square';
If you have more questions, please feel free to open another thread.
Best regards,
IsmaelAugust 25, 2021 at 5:45 am #1318213but allways think of : after changing these sizes – a regeneration of the calculated thumbnails had to be done ( see this again: Then regenerate thumbnails … )
You can read here about the influence of some parameters to those changed or new sizes: https://developer.wordpress.org/reference/functions/add_image_size/ – especially the crop ( true, false ) ;) seems to be important.August 25, 2021 at 11:50 am #1318262@Ismael,
Thanks for the clarification. Just to be sure we are on the same page, here is a demo that shows what I am after:
https://www.dropbox.com/s/vf9m8mzv8maaevp/20210825-featured-image.jpg?dl=0
Could you confirm the code change that gives me a proportionate image and not a specific size?
Thanks,
TimAugust 27, 2021 at 9:10 am #1318598Hi,
@hypergolica (Tim): Setting the thumbnail size or name to “full” should return the source image with the original dimension or size (unresized/uncropped). You should replace the above line with this.$size = strpos( $blog_style, 'big' ) ? ( ( strpos( $current_post['post_layout'], 'sidebar' ) !== false ) ? 'full' : 'full' ) : 'square';
.. or with this:
$size = strpos( $blog_style, 'big' ) ? 'full' : 'square';
Thanks @Guenni007 for the info.
Best regards,
IsmaelAugust 27, 2021 at 9:33 pm #1318717@Ismael,
Your wizardry worked again! I used this:
$size = strpos( $blog_style, 'big' ) ? ( ( strpos( $current_post['post_layout'], 'sidebar' ) !== false ) ? 'full' : 'full' ) : 'square';
I did not have to regenerate thumbnails… when the posts loaded they were initially disproportionate, but then they snapped to the proper proportions… and it looks like it stayed that way.
Note: Under blog layout > single post style, I have it set to single post with big preview image.
Thank you all!
TimAugust 29, 2021 at 11:13 am #1318827@ismael and all:
I remembered I had some custom CSS to keep the featured image from being too big. Here it is:
/* This sets the featured image to be a fixed size; that way it isn't shown bigger than it actually is */ .big-preview img { width: inherit !important; max-width:500px !important; /*max-height:500px !important;*/ margin:auto !important; }
For some reason the max-height together with the max-width was causing the deformation. So, I commented the height and it seems to work fine.
All in all, this issue strikes me as way too complicated than it should be, i.e., having to change code in a file + custom CSS. Would be good in a future release to simply have more direct options for the Featured Image.
Best,
Tim
August 31, 2021 at 3:15 am #1319049Hi,
Glad to know that it is working. Template modification and adding custom css code are some of most common way to achieve or create a certain layout. Sadly, we cannot add every little options in the theme without it getting bloated, so we have to be very selective on what options to actually add.
If you have more questions, please feel free to open another thread. We will close this one for now.
Have a nice day.
Best regards,
Ismael -
AuthorPosts
- The topic ‘Blog Featured Image Size’ is closed to new replies.