[Resolved] Add options
Can you add an option where you can get to choose whether to make smush or not when uploading images. If you have many image sizes defined, then the upload and creation of image sizes crashes.
Better to smush in the media library after upload.
Hello there @jontng,
This could be due to low PH memory limits or a PHP timeout, have you tried increasing these in your php.ini?
Yes, I know that it may have with the server to do. But if you don’t have permission to go in and make changes to the server, it becomes difficult. So I thought it would be good if there was an option to choose when you want to do smush, instead of uploading would halt or crash.
The themes I do, at home and at work, we often have 15 different image sizes defined or more, which becomes quite heavy at the upload.
I/We also use the plugin Simple Images Sizes, which has a conflict with WP Smush.it what it looks like.
Good idea I’ll add this as a feature request, however in the mean time, how about disabling the plugin when uploading lots of images and then re-activating afterwards?
I’ve literally JUST discovered that it’s possible to disable the plugin in Settings > Media
So you can set it to not automatically Smush on upload, save it, upload all of your images then re-enable it when done 🙂
I have found the settings too. But the setting form does not seem to work. It does not save and I get the following errors on one of my blogs.
Warning: trim() expects parameter 1 to be string, array given in /wp-admin/options.php on line 147 Warning: trim() expects parameter 1 to be string, array given in /wp-admin/options.php on line 147 Warning: Cannot modify header information - headers already sent by (output started at /wp-admin/options.php:147) in /wp-includes/pluggable.php on line 875
Could you please follow the step-by-step instructions on the codex here:
No luck. I have gone through the guide, but have not got it to work.
I’ve tried the plugin on more sites on different servers, with different themes and plugins. I don’t always get error messages, but it does’nt save any setting.
Was there any white space?
Have you tried disabling other themes and switching to TwentyTwelve to see if it then works?
WebWizard here, never fear I’m saving you time on your rear!
In response to the errors Jon posted a week ago.
The issue is in the WP Smush.it plugin, don’t be fooled by the error.
In the file wp-smushit.php on lines 105 and 106, a call to register_setting() function is made incorrectly. In the current version (1.6.5) the call looks like this:
register_setting( 'media', array( &$this, 'smushit_auto' ) ); register_setting( 'media', array( &$this, 'smushit_timeout' ) );
And it should look like this:
register_setting( 'media', 'wp_smushit_smushit_auto' ); register_setting( 'media', 'wp_smushit_smushit_timeout' );
Making these changes on my own allows me to save the settings on the media settings page without error, and the settings all stick after the page is reloaded.
Hope this tid-bit has helped you all out.
I’m looking forward to seeing this issue fixed in version 1.6.6. 🙂
That’s awesome thank you. I’m passing this on to the developer that has taken over Smush.it and hopefully he will add this to the next version.
@jontng did that solution work for you? If so please mark as resolved so that others can find the thread easily in the future as this is such a simple fix that is difficult to find for those without a brilliant knowledge of PHP!
I have not had a chance to look over the code, because I’m on vacation. But I’ll tackle it as soon as I get home.
Thanks for the code changes. Yes, the previous developer did this settings wrong. Have fixed this issue as well as some other issues related to the image path. Anyone want to beta test this before release?
- The topic ‘[Resolved] Add options’ is closed to new replies.