[Resolved] Support for bbPress / "GD bbPress Attachments"-plugin
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:
The user-uploads are (also) stored within the regular WP media library (/uploads/…).
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.
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.
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.
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:
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 🙂
- The topic ‘[Resolved] Support for bbPress / "GD bbPress Attachments"-plugin’ is closed to new replies.