EWWW Image Optimizer compatibility
-
Hi, I’m the author of EWWW IO, and recently had a couple folks mention they were using EWWW IO on your platform. The first was using our API, which works anywhere. But the second individual was trying to use the free version, which relies on exec, and uses local versions of jpegtran, optipng, etc.
It didn’t seem to be working though, and so I wondered what the technical constraints are with the business plans. He was getting permissions errors, but the actual permissions looked correct. It seemed as if something else was preventing executables from running in the webroot.
So, could someone clarify what is actually possible with a wp.com business plan? Should the executables actually run, or do I need to guide wp.com folks to use the API for image optimization? If the latter, is there some constant defined on wp.com sites, or some way to auto-detect the wp.com platform for that purpose?
Thanks!
-
While you are waiting for a Staff response you may want to read:
https://en.support.wordpress.com/business-plan/ -
Hi @nosilver4u, do you know if they sites that were using your software are self-hosted, or were they hosted here at WordPress.com? There are some restrictions on Business Plan sites here, and it could be that what is required to run the free version is not part of our system.
A link or two to a couple of sites would be helpful, if you can provide them.
-
These two sites were indeed hosted at WordPress.com. I believe both were using the business plan. The one in particular that was trying to use the free mode of the plugin is at https://notimefindtime.com/
To use the “free mode”, the plugin requires exec(), and the ability to run exec() on binaries located in the wp-content/ewww/ folder.
That site was getting this message when trying to run one of the binaries:
sh: 1: /wpcom-xxxxxxxxx/wp-content/ewww/gifsicle: Permission denied -
Thanks @nosilver4u, I checked with our systems people, and for security reasons, we do not allow running of binary files on our platform.
-
Alright, so the next question, is there some constant defined on wp.com sites, or some way to auto-detect the wp.com platform, to let users know free mode doesn’t work?
-
Howdy –
I am not certain whether or not this is possible. To be certain I’ve asked the appropriate team to have a look. Once I hear back form them I will send another update here.
-
Alright, so the next question, is there some constant defined on wp.com sites, or some way to auto-detect the wp.com platform, to let users know free mode doesn’t work?
You may check whether the
WPCOMSH_VERSIONconstant is defined. Alternately, why not simply check if the binary is executable withis_executablegiven that any other host may also not allowexec? -
That’s a good question, and the plugin actually does an
is_executablecheck. That, of course, fails, and results in a message that tells them the plugin needs jpegtran, optipng, and gifsicle to function OR an API key. From there, folks often end up asking how they can fix the “missing binary” problem or trying to work through the docs article we have on the subject. What I’d rather do for wp.com folks is save them some time and just let them know up front that the plugin is going to require an API key. So checking for that constant will be most helpful, thanks!
- The topic ‘EWWW Image Optimizer compatibility’ is closed to new replies.