Tagged: image sizing
-
AuthorPosts
-
August 16, 2014 at 2:55 am #305156
I have a lot of images that I am going to upload via FTP to specifically use with one particular dimension. I have noticed that a lot of new image sizes are are created when the enfold theme is used. Can you provide me with a process to disable your the image sizing function and then I will enable it later.
thanks,
Ed
- This topic was modified 10 years, 3 months ago by EdFritz.
August 16, 2014 at 8:38 am #305218Hi Ed!
You just need to comment out one line in enfold/functions.php. Replace:
avia_backend_add_thumbnail_size($avia_config);
with
//avia_backend_add_thumbnail_size($avia_config);
If you want to generate the thumbnails undo the code modification and regenerate the thumbnails with: https://wordpress.org/plugins/regenerate-thumbnails/
Cheers!
PeterAugust 16, 2014 at 10:09 am #305240I have followed your instructions and they are incorrect. Images continue to be created.
http://prntscr.com/4dbeat
http://prntscr.com/4dbcopNo Cheers
Ed
August 16, 2014 at 11:16 am #305250Hi!
Try to install this plugin: https://wordpress.org/plugins/simple-image-sizes/ and remove all sizes you don’t want to use from the database. (Settings > Media).
Regards,
PeterAugust 16, 2014 at 1:00 pm #305280This reply has been marked as private.August 16, 2014 at 1:30 pm #3052841) Did you deactivate the plugin before you commented out the code? Otherwise wordpress will use the values stored in the database (= plugin settings)…
2) This is my last and only warning Ed. I don’t accept your disrespectful behavior towards the support staff and I’ll kick you out of the support forum (= permanent ban) if I get answers like “knowledgable on how to..” or “No Cheers”. I really don’t care if you send a complaint to Kriesi because we (= the support team) have no obligation to provide support to users who are disrespectful.
August 16, 2014 at 2:16 pm #305290This reply has been marked as private.August 17, 2014 at 5:19 pm #305443Hi!
The only images that should get uploaded in the old folder would be those imported with the dummy data. Otherwise its using the native WordPress image functions.
All of the theme image sizes come from the function highlighted above so once its disabled they should no longer be activated on uploaded unless there is something else keeping them live like the simple image sizes plugin.
You will still have the regular WordPress thumb sizes created unless you further disable those (thumb and medium).
Best regards,
DevinAugust 17, 2014 at 5:41 pm #305447Hi Darin,
Thanks for the info.
But even after I disabled the Simple plugin.
Then changed my function.php with //avia_backend_add_thumbnail_size($avia_config);
and when I added a new image to my Library, all the Enfold images sizes still were generated !
Any ideas ?
August 17, 2014 at 6:19 pm #305451That screenshot shows the function *not* commented out. That would mean it is still running and would definitely mean the images would be generated on upload.
The function needs to be commented out. You can comment out php by adding // before the line, /* before and */ after or you can simple delete the function.
August 17, 2014 at 7:19 pm #305460Miscommunication on my ;part. I have put a // in front to disable but it did not work. I still was creating all the resized images
thoughts ?
August 17, 2014 at 7:36 pm #305466You could try removing the entire set of image sizes from the functions.php just above that line which is where they are defined:
$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 );
Though it shouldn’t be needed it is the line by line settings for what image sizes are loaded into the avia_config array.
August 17, 2014 at 7:58 pm #305479You think I should delete all these definitions ?
http://prntscr.com/4dqsjt
that seems drastic to me.I suppose I could try one and then see if that image is still being created.
Maybe I should delete and not just deactive the Simple plugin
Maybe I should just change the values to zero in function php
What about commenting out one line in the function and see what happens?
ie: // $avia_config[‘imgSize’][‘widget’] = array(‘width’=>36, ‘height’=>36); // small preview pics eg sidebar newsYour thoughts on these ideas..
Ed- This reply was modified 10 years, 3 months ago by EdFritz.
August 17, 2014 at 10:11 pm #305502If you want to remove the images from being created then it isn’t drastic at all. Its simply the next step in what you would do to remove a part of the themes normal functionality to fit your needs.
August 18, 2014 at 5:17 am #305552I was able to remove the re-sizing images from being created by Enfold theme simply by adding a /* at line 92 and */ at line 111 in the function.php. This was an easy and elegant solution to my needs. I was looking for any easy way to disable the resizing prior to uploading over 50 large images to use in my portfolio via Lightroom and FTP with only one dimension required for use in the theme. I needed to easily turn on and turn off the resizing function. You may find this method useful for other customers in the future, rather than removing all those lines from functions.php…
I don’t know why //avia_backend_add_thumbnail_size($avia_config); did not work. But it gave me the idea to use my process above. Using the same logic, to comment out. I also deactivated the plug-in simple image sizes, one less plugin is a good thing.
thanks,
Ed
August 18, 2014 at 4:28 pm #305835Glad we could help. Let us know if you have any other questions or issues.
-
AuthorPosts
- The topic ‘How to Disable Enfold creating Media Image Sizes ??’ is closed to new replies.