Viewing 30 posts - 1 through 30 (of 36 total)
  • Author
    Posts
  • #483157

    Hi there,

    The thumbnails in my ‘Enfold latest news‘ widget in the sidebar appear blurry. I changed the size of the thumbnails in my child’s layout.css >

    .news-thumb img, .news-thumb img { width: 100px; height: 100px; }
    .news-thumb { width: 100px; height: 100px; }
    strong.news-headline { font-size: 14px; }

    And in my child’s functions.php >

    $avia_config[‘imgSize’][‘widget’] = array(‘width’=>100, ‘height’=>100); // small preview pics eg sidebar news

    Then I regenerated the thumbnails with the plugin ‘Regenerate thumbnails’. Usually this helps, but the thumbnails stay blurry. The images are big enough, 650 x 433 px, so that is not the problem. Also, it seems that the images don’t fit into the box, as the bottom of the thumbnail appears outside of the (border) box.

    #483216

    Hey Deborahvwdj!

    Can you please inspect elements on the image you pointed out and post a new screenshot showing source code?

    Best regards,
    Yigit

    #483253

    Hi Yigit,

    The screenshot:

    #483255

    Hi!

    Widget thumbnails are still 36x36px. Please remove the line you have added to your child theme’s functions.php file and add following instead

    add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 );
    function enfold_customization_modify_thumb_size( $size ) {
            $size['widget'] 		 	= array('width'=>100, 'height'=>100 );		
    	return $size;	
    }

    And then regenerate thumbnails

    Regards,
    Yigit

    #483286

    It worked, the thumbnails are now less blurry. But they still don’t fit into the border box around the image.. Any idea how I can fix that?

    #483295

    Hi!

    Please inspect these two lines as well – http://i.imgur.com/WmE3BbC.png and make sure that their heights are matching your widget thumbnails size

    Regards,
    Yigit

    #483326

    I changed the height to auto, instead of 100px and that seemed to work! Thanks :)

    #483338

    Hi!

    You are welcome Deborahvwdj, we are always happy to help. I hope we were able to change your mind about support we provide :)

    Cheers!
    Yigit

    #508674

    heio. Don´t wan to open a new thread.

    Is it possible to hide 7 deactivate the thumbnails with a function!

    with a function in the child theme functions.php!

    #508848

    Hi!


    @hunter74
    : I’m sorry but it’s not possible to delete a pre-set thumbnail size with a function. You can only remove the registered thumbnail size on functions.php file. Look for this block of code:

    $avia_config['imgSize']['widget'] 			 	= array('width'=>36,  'height'=>36);						// small preview pics eg sidebar news
    $avia_config['imgSize']['square'] 		 	    = array('width'=>180, 'height'=>180);		                 // small image for blogs
    $avia_config['imgSize']['featured'] 		 	= array('width'=>1500, 'height'=>430 );						// images for fullsize pages and fullsize slider
    $avia_config['imgSize']['featured_large'] 		= array('width'=>1500, 'height'=>630 );						// images for fullsize pages and fullsize slider
    $avia_config['imgSize']['extra_large'] 		 	= array('width'=>1500, 'height'=>1500 , 'crop' => false);	// images for fullscrren slider
    $avia_config['imgSize']['portfolio'] 		 	= array('width'=>495, 'height'=>400 );						// images for portfolio entries (2,3 column)
    $avia_config['imgSize']['portfolio_small'] 		= array('width'=>260, 'height'=>185 );						// images for portfolio 4 columns
    $avia_config['imgSize']['gallery'] 		 		= array('width'=>845, 'height'=>684 );						// images for portfolio entries (2,3 column)
    $avia_config['imgSize']['magazine'] 		 	= array('width'=>710, 'height'=>375 );						// images for magazines
    $avia_config['imgSize']['masonry'] 		 		= array('width'=>705, 'height'=>705 , 'crop' => false);		// images for fullscreen masonry
    $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
    

    EDIT: Actually, you can try this in the child theme’s functions.php file:

    function ava_image_sizes() { 
    	add_image_size('masonry', 0, 0);
    	add_image_size('magazine', 0, 0);
    	add_image_size('widget', 0, 0);
    }
    add_action( 'after_setup_theme', 'ava_image_sizes', 11 );

    Set the width and height to 0. Register all the thumbnails that you want to remove inside the ava_image_sizes function.

    Regards,
    Ismael

    #508851

    To change the predefined thumbnail sizes this one is correct – i found in other discussions:

    function enfold_customization_modify_thumb_size( $size ) {
        $size['widget'] 		 		= array('width'=>60, 'height'=>50 );							// small preview pics eg sidebar news
       $size['square'] 		 	        = array('width'=>180, 'height'=>180);		                                // small image for blogs
      return $size;	
    }
    add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 );
    

    WHAT I WANT… is to delete the thumbnail completely with a function.
    (Not just hide it) because of SEO issues
    COMPLETELY REMOVE THE THUMBNAIL

    #508854

    Hi!

    Yes, I know exactly what you want. That’s why I suggested to delete the registered thumbnail sizes in functions.php file. Actually, I edited my post above. You can try the ava_image_sizes function in the child theme’s functions.php file. Regenerate the thumbnails with this plugin: https://wordpress.org/plugins/force-regenerate-thumbnails/

    Regards,
    Ismael

    #508856

    No – what i want is not a different size.

    What I want is:

    No Image should be shown! /// .news-thumb { display: none; } ///
    But not like this.

    DELETE THE COMPLETE IMAGE WITH A FUNCTION

    • This reply was modified 9 years, 2 months ago by Raphael.
    #508889

    Hi!

    The code above will completely remove the thumbnails. Please try it first then update us if it doesn’t work. This is the full list of the thumbnails if you want to remove everything:

    function ava_image_sizes() { 
    	add_image_size('masonry', 0, 0);
    	add_image_size('magazine', 0, 0);
    	add_image_size('widget', 0, 0);
    	add_image_size('featured', 0, 0);
    	add_image_size('featured_large', 0, 0);
    	add_image_size('extra_large', 0, 0);
    	add_image_size('portfolio_small', 0, 0);
    	add_image_size('gallery', 0, 0);
    	add_image_size('entry_with_sidebar', 0, 0);
    	add_image_size('entry_without_sidebar', 0, 0);
    	add_image_size('square', 0, 0);
    }
    add_action( 'after_setup_theme', 'ava_image_sizes', 11 );

    Note that removing the thumbnails will have a negative effect on the site, on google pagespeed insights for example.

    EDIT: Don’t forget to use the plugin suggested on the previous post after you add the code. It will delete all the previous images then regenerate the default image.

    Regards,
    Ismael

    #508897

    Hi Ismael,

    sorry the code above isn´t working.

    #508968

    Hi!

    Please go to Enfold/framework/php folder and open class-framework-widgets.php file and find following on lines 527 and 1031

    echo $image;

    and comment it out as following

    //echo $image;

    Cheers!
    Yigit

    #508976

    hmm – a bit sad, that we can not create a function for this.

    #508981

    Hi!

    Please feel free to request it here – https://kriesi.at/support/enfold-feature-requests/

    Cheers!
    Yigit

    #509431

    Hi!

    The code is actually working on my installation. Did you regenerate the thumbnails?

    https://wordpress.org/plugins/force-regenerate-thumbnails/

    Cheers!
    Ismael

    #509493

    yes I can change the Image size :-) I know about the regeneration of thumbsnails about an year. I work on my 20th Enfold customization.

    Sorry for that had misunderstanding!

    A function to absoluteley hide / delete / remove the image – that is what I am talking about!!

    • This reply was modified 9 years, 2 months ago by Raphael.
    #509778

    Hey,

    Not sure if you need any more help with this or not? Please let us know if there’s still something you should need help with.

    Best regards,
    Rikard

    #509916

    A bit sad, there is no solution for this. – Everyone gets customiced and php developed small solutions like this.
    I need to find them to 80% by myself. :-/

    Add least, this code (in the functions.php) helps to change the sizes of the thumbnails

    function enfold_customization_modify_thumb_size( $size ) {
    		$size['widget'] 		 		= array('width'=>60, 'height'=>50  );	
        return $size;	
    }
    add_filter( 'avf_modify_thumb_size', 'enfold_customization_modify_thumb_size', 10, 1 );

    Thanks for the code from the support team. THere isn´t any childtheme (upgradeable function to delet / remove the image of the widget container.

    #510258

    Hi!

    glad you found a fix for you. You can also use a plugin like this: https://wordpress.org/plugins/simple-image-sizes/

    Regards,
    Andy

    #510265

    No, And no I Don´t want to use a plugin. To inflate the PHP Code for Enfold and WordPress …

    #510696

    Hey!

    A function to absoluteley hide / delete / remove the image – that is what I am talking about!!

    Please read my posts carefully. We know that you want to delete the thumbnails. The code above will remove the thumbnails or will not generate the thumbnails because we set the dimension to 0. It will NOT RESIZE the thumbnails. The code will REMOVE the thumbnails. If you’re confuse why we need the plugin, because it will delete all existing thumbnails in the uploads folder then generate the registered thumbnails. But since we set the dimension of the preset thumbnails to ZERO, it will NOT REGENERATE the thumbnails.

    EDIT: This is the code that you need to add in the functions.php file:

    function ava_image_sizes() { 
    	add_image_size('masonry', 0, 0);
    	add_image_size('magazine', 0, 0);
    	add_image_size('widget', 0, 0);
    	add_image_size('featured', 0, 0);
    	add_image_size('featured_large', 0, 0);
    	add_image_size('extra_large', 0, 0);
    	add_image_size('portfolio_small', 0, 0);
    	add_image_size('gallery', 0, 0);
    	add_image_size('entry_with_sidebar', 0, 0);
    	add_image_size('entry_without_sidebar', 0, 0);
    	add_image_size('square', 0, 0);
    }
    add_action( 'after_setup_theme', 'ava_image_sizes', 11 );

    PS: Please read our posts directly from the forum instead of your email because we tend to modify the reply in a few cases.

    Best regards,
    Ismael

    #510700

    Sorry for the missunderstanding. I tried all codes. Setting the Widget to “0” will insert the widget image with its original size or with the other code provided set the image to 100 in width and height.

    #510704

    Hi!

    Alright. Please post the login details here. We’ll try to implement the code. Is it OK if we regenerate all the thumbnails? This might break pages with images in your site. If you have a dev site, we’ll test the code there.

    Regards,
    Ismael

    #510706

    Hi Ismael,

    i tried and regenerate the thumbnails. Isn´t it easier to make a function like:::

    function avia_image_remove( $image ) {
            $image['widget'] 		 	= " ";		
    	return $image;	
    }

    I tried something like this. But it didn´t work.

    #510708

    Here is the login data

    #510712

    Hey!

    Thank you for the info. We would like to confirm if you have a back up or restore point of the site just in case? We added the code in the child theme’s functions.php and uploaded an image to test it. Usually, the theme will generate 19 thumbnails but since we added the modification, it only generates 7 thumbnails which means that the code works. You can check the wp-content > uploads folder. Look for the image file with the file name “Abducted”. If you want to remove everything including the shop thumbnails, replace the code in the functions.php file with this:

    function wp_23223255_6469586506596() { 
    	add_image_size('masonry', 0, 0);
    	add_image_size('magazine', 0, 0);
    	add_image_size('widget', 0, 0);
    	add_image_size('featured', 0, 0);
    	add_image_size('featured_large', 0, 0);
    	add_image_size('extra_large', 0, 0);
    	add_image_size('portfolio_small', 0, 0);
    	add_image_size('gallery', 0, 0);
    	add_image_size('entry_with_sidebar', 0, 0);
    	add_image_size('entry_without_sidebar', 0, 0);
    	add_image_size('square', 0, 0);
           add_image_size('shop_single', 0, 0);
          add_image_size('shop_thumbnail', 0, 0);
          add_image_size('shop_catalog', 0, 0);
    }
    add_action( 'after_setup_theme', 'wp_23223255_6469586506596', 11 );
    

    All you need to do now is to regenerate the thumbnails using the plugin that we suggested, if you want to remove existing thumbnails in your installation. Please create a backup before doing so.

    EDIT: I’m sure there’s a more simple function that can deal with this but this is all I can suggest for now.

    Regards,
    Ismael

Viewing 30 posts - 1 through 30 (of 36 total)
  • The topic ‘Blurry Thumbnails Enfold Latest News Widget’ is closed to new replies.