Tagged: 

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #498811

    Hi,

    My server space was almost full so I started to look for the cause. I’ve found out that when I’m uploading 1 image to my blog, with the size 900×600 px (152 kb), it end up on my server with 17 different sizes!!! From 36×36 px to 900 x 430 px. Total EXTRA used space for 1 image: 556 kb!

    (I didn’t check it for the images of my portfolio yet)

    I only need the size I upload. I can’t find the cause of all the sizes. Can I change this (put this OFF) anywhere in Enfold or WordPress?

    Thanks for your help!

    #498901

    Hi Ester1234!

    You can find those and comment them out around line 117 in the /enfold/functions.php file.

    Regards,
    Elliott

    #500114

    Hi Elliott,

    Thanks for your reply.

    I’m using lots of images on my site, so the theme was making very making extra images for all sizes.

    I upload all the needed image sizes myself, I don’t want the theme making extra (sizes) images for me. Or isn’t that logical?!

    I’ ve tried to delete a part from the code in the functions.php-file, but after that I had an error. I’ ve put the original functions.php-file back.

    Can you please tell me which part of the function.php-file I have to change or delete?

    Thanks a lot!

    #500157

    Hey!

    Try adding this at the very end of your theme / child theme functions.php file:

    add_filter('avf_modify_thumb_size', function($sizes) {
    	return array();
    });

    Cheers!
    Josue

    #500311

    Thanks Josue,

    I’ve added the code.

    But when I inlog to WordPress or open my website url I get this error :

    Parse error: syntax error, unexpected T_RETURN, expecting T_STRING or T_VARIABLE or ‘$’ in C:\domains\esterammerlaan.nl\wwwroot\wp-content\themes\enfold\functions.php on line 523

    #500783

    Try with this instead:

    add_filter('avf_modify_thumb_size', function($sizes) {
            $sizes = array();
    	return $sizes;
    });
    #501110

    Hi Josue,

    Thanks for your information. I’ve added the code. No error this time yeahhhh. :o)

    I don’t know what the code is doing exactly, but after adding the code and uploading de function-file I added some new images to my portfolio.

    But the theme is still making lots of extra images in different sizes.

    For example: I uploaded an image with size 500×700 px to my portfolio, the theme made 16 extra images with sizes from 36×36 to 500×684.

    So nothing changed?

    #501368

    Hi!

    Please edit the functions.php file then remove this 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

    Regenerate the thumbnails after: https://wordpress.org/plugins/force-regenerate-thumbnails/

    Note that removing the thumbnails might slow down the website because it has to use the original image for every element on the page.

    Cheers!
    Ismael

    #505905

    Hi Ismael,

    Thanks for your advice.

    I edited the function.php and removed the code.

    After that, the extra images are still added.

    I didn’t regenerate the thumbnails, because the images were still there.

    #505999

    Hi,

    Can you please create us a WordPress administrator account? post it here as a private reply.

    Regards,
    Josue

    #506129

    It’s no problem for me when the theme is creating some extra images in different sizes, when 1 upload when.

    But so much extra images (every time 1 upload a new one) is using too much from “my server space”

    Thanks for your patience and time!

    #506319

    Thanks for the access, can you please try uploading a new image and check if the images are still being generated?

    Regards,
    Josue

    #508083

    Hi Josue,

    After uploading a new image to my portfolio, 6 new images were made. And after uploading an image for my blog, 5 new images were made. So that’s a great improvement, instead of the 17 extra images!

    Thanks a lot for your patience, time and solution!

    Regards,
    Ester

    #508111

    You are welcome Ester, glad to help :)

    Regards,
    Josue

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