Mostly thinking aloud here, but I've always found the command line optimizations to be a nice thing to have, but a probably security risk and slow, so I've not really used them in production. I wonder if they would sit better in their own submodule, or even their own separate contrib project.
We could then focus the main project on adding the optimization pipeline to image styles, providing an API for that etc. and then have lots of other modules for actually integrating with other services. Given how Drupal 8 sites are largely built with composer, bringing in these sorts of additional dependencies it's too arduous any more. We'd benefit from having more focussed tests in our modules I think, and would probably be able to get to a stable version much quicker :)
Comment | File | Size | Author |
---|---|---|---|
#14 | imageapi_optimize-2990670-update-hook.patch | 6.6 KB | Steven Jones |
#5 | imageapi_optimize-2990670-remove-the-processors.patch | 51.26 KB | Steven Jones |
Comments
Comment #2
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedIn fact we can do this for resmushit and tinypng too, basically everything.
Comment #3
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedHere's a patch that removes all of the implementation specific code from the 8.x-2.x branch.
Comment #5
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedComment #7
jcisio CreditAttribution: jcisio at Axess Open Web Services for Institut français commentedSteven, I think instead of moving to another contrib project, it would be better to split of to a submodule (etc. image optimize providers - I don't see the benefit of creating N submodules), and enable it in a hook_update_N, not hassle with yet another extra lightweight module. While some projects use several contrib projects for their sub modules, I think we are not reach the critical mass that need it: each provider is just a few dozens of lines. The drawback is we can't have independent releases in each module, but is it a real need now? What if we consider the module stable when the core module is stable?
Now, about the patch. If we move to a separate submodule (or three submodules, for CLI and online tools), should we leave the abstract implementation and the interface in the core module?
Comment #8
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedA couple of big things I can think of:
And more generally:
Comment #9
jcisio CreditAttribution: jcisio at Axess Open Web Services for Institut français commentedAbout libraries for 3rd party services, you made a good point. So indeed we need a project for each service.
About local tools, I'm not sure it works like that. "command line optimizations" should be correctly said as "local optimizers" vs. "remote optimizers". And I'd rather argue that remote optimizers is more a security risk than local optimizers, because it depends on a 3rd party remote server. I understand what you feels, about running exec() in PHP. However, it's what we do everywhere, in Drupal and Symfony, in the imagemagick module, and PHP safe mode turned out to be a bad decision and was removed.
That said, these local tools should logically live in a separate project, too. I've just seen https://www.drupal.org/project/imageapi_optimize_binaries so it'd good for me ;)
Comment #10
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedLovely, I'll work on this today, and work out where we with regard to getting a beta out!
Comment #12
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedI've pushed the initial code removal.
Things that we should do:
Comment #13
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedI wonder if we can list the processors on each pipeline and see what their provider was, or at least have some kind of fixed mapping.
Comment #14
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedHere's a patch that does some enabling of new modules.
Comment #17
Steven Jones CreditAttribution: Steven Jones at ComputerMinds commentedNeed to remember to document this in the release notes, but this is otherwise done now.