-
AuthorPosts
-
August 5, 2015 at 9:27 am #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.
August 5, 2015 at 11:26 am #483216Hey Deborahvwdj!
Can you please inspect elements on the image you pointed out and post a new screenshot showing source code?
Best regards,
YigitAugust 5, 2015 at 12:20 pm #483253Hi Yigit,
The screenshot:
August 5, 2015 at 12:27 pm #483255Hi!
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,
YigitAugust 5, 2015 at 1:12 pm #483286It 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?
August 5, 2015 at 1:29 pm #483295Hi!
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,
YigitAugust 5, 2015 at 1:59 pm #483326I changed the height to auto, instead of 100px and that seemed to work! Thanks :)
August 5, 2015 at 2:12 pm #483338Hi!
You are welcome Deborahvwdj, we are always happy to help. I hope we were able to change your mind about support we provide :)
Cheers!
YigitSeptember 24, 2015 at 7:53 pm #508674heio. 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!
September 25, 2015 at 9:54 am #508848Hi!
@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,
IsmaelSeptember 25, 2015 at 9:57 am #508851To 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 THUMBNAILSeptember 25, 2015 at 10:04 am #508854Hi!
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,
IsmaelSeptember 25, 2015 at 10:07 am #508856No – 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.
September 25, 2015 at 10:39 am #508889Hi!
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,
IsmaelSeptember 25, 2015 at 10:52 am #508897Hi Ismael,
sorry the code above isn´t working.
September 25, 2015 at 1:08 pm #508968Hi!
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!
YigitSeptember 25, 2015 at 1:23 pm #508976hmm – a bit sad, that we can not create a function for this.
September 25, 2015 at 1:29 pm #508981Hi!
Please feel free to request it here – https://kriesi.at/support/enfold-feature-requests/
Cheers!
YigitSeptember 26, 2015 at 10:09 am #509431Hi!
The code is actually working on my installation. Did you regenerate the thumbnails?
https://wordpress.org/plugins/force-regenerate-thumbnails/
Cheers!
IsmaelSeptember 26, 2015 at 1:42 pm #509493yes 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.
September 28, 2015 at 4:43 am #509778Hey,
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,
RikardSeptember 28, 2015 at 10:52 am #509916A 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.
September 28, 2015 at 4:48 pm #510258Hi!
glad you found a fix for you. You can also use a plugin like this: https://wordpress.org/plugins/simple-image-sizes/
Regards,
AndySeptember 28, 2015 at 4:55 pm #510265No, And no I Don´t want to use a plugin. To inflate the PHP Code for Enfold and WordPress …
September 29, 2015 at 12:18 pm #510696Hey!
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,
IsmaelSeptember 29, 2015 at 12:26 pm #510700Sorry 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.
September 29, 2015 at 12:43 pm #510704Hi!
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,
IsmaelSeptember 29, 2015 at 12:50 pm #510706Hi 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.
September 29, 2015 at 1:02 pm #510708Here is the login data
September 29, 2015 at 1:19 pm #510712Hey!
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 -
AuthorPosts
- The topic ‘Blurry Thumbnails Enfold Latest News Widget’ is closed to new replies.