Tagged: featured image
-
AuthorPosts
-
September 10, 2015 at 6:47 pm #501270
Hi,
I’m trying to prevent thumbnails of featured images from being cropped in my blog. Sometimes pictures are fully displayed, sometimes not. Do uploaded pictures need to be a certain size in order to not be cropped? Or is there some setting that I’m overlooking? I’ve tried some of the plugins and suggestions offered elsewhere in this forum and nothing seems to work. Thanks for your help!
September 11, 2015 at 7:59 am #501456Hey reederjack5252!
Thank you for using Enfold.
I checked the blog page and the layout is quite different from the default layout. It looks modified. There’s even an alternating featured image. Can you please provide a screenshot of the issue? You can find the thumbnail size option for posts on functions.php. Look for this code:
$avia_config['imgSize']['entry_with_sidebar'] = array('width'=>845, 'height'=>321); // big images for blog and page entries $avia_config['imgSize']['entry_without_sidebar']= array('width'=>1210, 'height'=>423 ); // images for fullsize pages and fullsize slider
You can adjust the width and height then regenerate the thumbnails. Or resize the image to the specified dimension before uploading it as featured image.
Best regards,
IsmaelSeptember 11, 2015 at 9:54 pm #501889I inherited this website from another designer, and I didn’t realize he had made any changes to the blog layout. I don’t mind if the images are downsized. I just want to prevent them from being cropped. The top two images were originally designed to be shared on social media and formatted accordingly (roughly square), but then the blog makes them letterbox and crops the top and bottom.
The picture of the dudes face is also square but relatively small, and it’s not cropped and has been enlarged.
- This reply was modified 9 years, 2 months ago by reederjack5252.
September 12, 2015 at 5:11 am #501954Hey!
Did you try to adjust the code on functions.php as suggested above?
Please check the child theme folder. I think you’ll find the includes > loop-index.php file somewhere. Look for this code:
//echo preview image if(strpos($blog_style, 'big') !== false) { if($slider) $slider = '<a href="'.$link.'" title="'.$featured_img_desc.'">'.$slider.'</a>'; if($slider) echo '<div class="big-preview '.$blog_style.'">'.$slider.'</div>'; }
Or just paste the whole code on pastebin.com. We would like to check it.
Cheers!
IsmaelSeptember 29, 2015 at 7:42 pm #510954Here’s the functions.php file for the child theme.
September 29, 2015 at 7:47 pm #510961Here’s the style.css for the child theme.
Appreciate the help.October 1, 2015 at 6:39 am #511955Hi!
Thanks for the update. It’s been a while now. If you check my last post, we are actually asking for the loop-index.php file because the last developer might have modified that file. Anyway, I inspect the style.css file and he did the modification via css. If you inspect the featured image , you’ll see this class attribute “attachment-entry_with_sidebar”:
<img width="470" height="246" src="http://myholytrinitychurch.com/wp-content/uploads/2013/04/myholytrinity-Why_Anglican.jpg" class="attachment-entry_with_sidebar wp-post-image" alt="myholytrinity-Why_Anglican">
It means that it is a theme generated thumbnail. Try to add this in the functions.php file to adjust the thumbnail:
function wp_23223255_6469586506596() { add_image_size('entry_with_sidebar', 999, 999); add_image_size('entry_without_sidebar', 999, 999); } add_action( 'after_setup_theme', 'wp_23223255_6469586506596', 11 );
Adjust the width and height values (999) if necessary. You need to use this plugin afterwards. https://wordpress.org/plugins/force-regenerate-thumbnails/
Best regards,
IsmaelOctober 28, 2015 at 6:26 pm #526342So I modified the functions.php file, regenerated the thumbs, and nothing changed for the thumbs of the blog, but my entire media library appeared to be bank. I then removed the additions to the functions.php file and the media library repopulated on refresh.
October 29, 2015 at 8:20 am #526576Hey!
Did you remove the browser cache after you regenerated the thumbnails? You might be looking on a cached version of the site. How is it possible that you see images in the blog if there are no images in the media library. Try this plugin to resize the thumbnails. https://wordpress.org/plugins/simple-image-sizes/
Best regards,
Ismael -
AuthorPosts
- You must be logged in to reply to this topic.