WordPress.org

Forums

WP Smush
[resolved] Add options (16 posts)

  1. Jon Täng
    Member
    Posted 2 years ago #

    Great plugin!

    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.

    http://wordpress.org/extend/plugins/wp-smushit/

  2. Aristeides Stathopoulos
    PressCodes
    Posted 2 years ago #

    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?

  3. Jon Täng
    Member
    Posted 2 years ago #

    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.

  4. Mike
    WPMU DEV Support Staff
    Posted 1 year ago #

    Hi @jonthng

    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?

  5. Mike
    WPMU DEV Support Staff
    Posted 1 year ago #

    Hey @jonthng

    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 :-)

  6. Jon Täng
    Member
    Posted 1 year ago #

    Hi,
    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
  7. Mike
    WPMU DEV Support Staff
    Posted 1 year ago #

    Hi @jonthng

    Could you please follow the step-by-step instructions on the codex here:
    http://codex.wordpress.org/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

  8. Jon Täng
    Member
    Posted 1 year ago #

    Hi @Mike

    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.

  9. Mike
    WPMU DEV Support Staff
    Posted 1 year ago #

    Hi @jonthng

    Was there any white space?

    Have you tried disabling other themes and switching to TwentyTwelve to see if it then works?

  10. WWWebWizard
    Member
    Posted 1 year ago #

    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. :)

    Peace!

  11. Jon Täng
    Member
    Posted 1 year ago #

    :)

    So simple.

  12. Mike
    WPMU DEV Support Staff
    Posted 1 year ago #

    Hi @WWWebWizard

    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!

  13. Jon Täng
    Member
    Posted 1 year ago #

    Hi Mike
    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.

  14. @WWWebWizard,

    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?

  15. Jon Täng
    Member
    Posted 1 year ago #

    The plugin works great now with the new update. :)

  16. Mike
    WPMU DEV Support Staff
    Posted 1 year ago #

    Hi @jontng

    That's great to hear! Thanks for the feedback.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Smush
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic