Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #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!

    #501456

    Hey 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,
    Ismael

    #501889

    I 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.

    #501954

    Hey!

    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!
    Ismael

    #510954

    Here’s the functions.php file for the child theme.

    #510961

    Here’s the style.css for the child theme.
    Appreciate the help.

    #511955

    Hi!

    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,
    Ismael

    #526342

    So 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.

    #526576

    Hey!

    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

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