Tagged: featured image
-
AuthorPosts
-
August 26, 2017 at 2:04 pm #844344
Hello, I am using images with the dimensions of 1200×628 (for social media purposes). I’m using the Enfold blog layout of “Single Post with Big Preview Image (Featured Image).” The inherent dimensions of the preview in the them is less height, cause this to cut off the top and bottom of my images. I want the big preview image to show the full height.
In the past I have searched these forums and found this CSS:
.big-preview img {
height: auto !important;
width: 100% !important;
}It has worked fine in the past but the last several weeks it has stopped working for some reason. You can see my recent posts do not have the full dimensions:
But past posts do:
Any idea what changed, why this is happening, and what I can do to fix? Thanks
August 26, 2017 at 4:21 pm #844355Hey mmr1234,
The difference I see between the old and new posts is the old one is using the srcset attribute and includes 7 image sizes, and the new one is not. Can you please include a admin login in the private content area so we can take a closer look.
But first, please Try disabling your plugins to rule out a conflict.Best regards,
MikeAugust 26, 2017 at 4:45 pm #844359Ok, thanks for reply. I’ve changed nothing. And my older posts are showing the feature image at the top of the blog posts with the full dimensions, so correct me if I am wrong but not sure how that could be a plugin conflict? This is happening on multiple websites I have with Enfold. Appreciate you taking a look, private message with admin access below.
August 30, 2017 at 12:10 pm #845753Hi,
Try the following:
1. Install this plugin: https://wordpress.org/plugins/simple-image-sizes/
2. Go to Settings > Media
3. Change theentry_with_sidebar
image size (increase its width / height).
4. Regenerate the thumbnails by clicking the button at the bottom.
Best regards,
YigitAugust 30, 2017 at 1:09 pm #845771Thanks, that worked well. For those with similar issue, I kept the width as listed and just add to the height, then select “no” to crop the image.
Hate to have to use a plugin for this, especially consider the previous CSS entry worked fine. Any idea why it stopped working and is there a fix or built in function coming for this? Thanks!
September 1, 2017 at 1:36 pm #846849Hi,
You can add following code to your child theme’s functions.php file
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'=>200, 'height'=>200); return $size; }
adjust the size and regenerate thumbnails using this plugin – https://wordpress.org/plugins/regenerate-thumbnails/ then you can remove the plugin :)
Best regards,
YigitOctober 5, 2023 at 6:16 pm #1421523Could you please advise me on where I can change the code so that the big preview image is not cropped but displays the full height? I don’t want to have to use the simple image plugin to adjust the image size since it is not being maintained. (but I can use one to regenerate the thumbnails. ) Thanks!
- This reply was modified 1 year, 2 months ago by williamslyd.
October 6, 2023 at 10:07 am #1421591Hi,
We can adjust the filter above to set the size of the featured images of entries without a sidebar. Please replace the filter with the following code.
add_filter( 'avf_modify_thumb_size', 'avf_modify_thumb_size_mod', 10, 1 ); function avf_modify_thumb_size_mod( $size ) { $size['entry_with_sidebar'] = array('width'=>1600, 'height'=>9999); return $size; }
If you require more assistance, please feel free to open another thread.
Best regards,
Ismael -
AuthorPosts
- The topic ‘Featured Image Preview Size in Blog Post’ is closed to new replies.