WordPress.org

Ready to get started?Download WordPress

Forums

EWWW Image Optimizer
[resolved] Support for bbPress / "GD bbPress Attachments"-plugin (5 posts)

  1. leanderbraunschweig
    Member
    Posted 9 months ago #

    Hi there!

    I had to switch away from WP Smush.it due to the restrictions in filesize and found this plugin – so far I am very impressed!!

    For my use-case though, this isn't working out of the box and I'd like (you) to evaluate the support for bbPress, more specifically the "GD bbPress Attachments"-plugin.

    WHAT'S THE PROBLEM

    I am using the "GD bbPress Toolbox" (http://www.dev4press.com/plugins/gd-bbpress-toolbox) which incorporates the functionalities of GD bbPress attachments (http://wordpress.org/plugins/gd-bbpress-attachments). This allows users to upload content to the WP media library from within their posts/topics.

    Unfortunately, the images are not processed/optimized by EWWW Image Optimizer.

    The plugin status indicates, that all necessary criteria are met.

    I went ahead and checked if all is running smoothly with a standard WordPress article and yes, all is good there – see the comparison (bbPress upload & WordPress article upload) here:

    http://imageshack.us/photo/my-images/46/bse4.png

    The user-uploads are (also) stored within the regular WP media library (/uploads/...).

    WHAT'S NEXT

    I read up upon the current events in http://wordpress.org/support/topic/feature-request-add-custom-directories and haven't tested the 'dev'-version just yet because I wanted to get some advice first:

    • Do I need the dev-version / will it likely support bbpress-uploads?
    • Would the desired functionality require you to enhance EWWW Image Optimizer accordingly or rather the plugin developer over at Dev4Press to include a hook of some sort to support EWWW Image Optimizer?

    I'll manage communication with Dev4Press (if needed) & support the development / debugging-process as best as I can.

    Thanks so much for your efforts and I am looking forward to your statement.

    Regards,
    Henning

    http://wordpress.org/plugins/gd-bbpress-attachments/

    http://wordpress.org/plugins/ewww-image-optimizer/

  2. nosilver4u
    Member
    Plugin Author

    Posted 9 months ago #

    It appears that the plugin is uploading things properly, but it doesn't seem to trigger the filter for optimizing the images OR the filter isn't running the optimization properly since the images are being uploaded outside of the WP admin. It is unlikely that the dev version will fix the issue at this point, but I've got an idea on the fix since I think this is affecting some other plugins too.
    I'll try to keep you posted when I've got a potential fix.

  3. nosilver4u
    Member
    Plugin Author

    Posted 9 months ago #

    It appears that the problem is partially solved in the dev release.
    IF the image is large enough to require that WP generate resizes, it will load the wp_image_editor class extensions from the plugin, which will initialize the EWWW IO plugin, and then once the resizes are done, the full size will get optimized.

    However, if the image is smaller than your thumbnail size, the wp_image_editor extensions don't get called, the plugin isn't initialized, and it doesn't have what it needs when it is finally asked to optimize the image. This should be a pretty trivial fix, just need to figure out what level to implement it at.

  4. nosilver4u
    Member
    Plugin Author

    Posted 9 months ago #

    So, turns out it was really quite trivial. One variable was missing if the init() function hadn't been called. Now it does a quick check for the variable, and runs the init() if it isn't defined.

    You can check it in the latest dev release:
    http://downloads.wordpress.org/plugin/ewww-image-optimizer.zip

  5. leanderbraunschweig
    Member
    Posted 9 months ago #

    Wow – perfect! I just installed the dev-release and it works like charm. Thanks so much.

    I hoped that it wouldn't be that complicated since the attachment-plugin (more or less) followed standard procedure. Glad that turned out to be true!

    Keep up the good work. I've send you a small token of appreciation :)

    Cheers!
    Henning

Reply

You must log in to post.

About this Plugin

About this Topic