Large images uploaded by forum users were clogging up my server. Rather than make changes to core vanilla code, I decided a simple solution would be to run a cron script that checks for "large" jpeg's, and compresses one image every 30 minutes.
This is the script I came up with.
I added these files to my public_html, and then added a run line to cron this command every 30 minutes:
I'm not an experienced php developer, so critical eyes and feedback are welcome, as there's the possibility I'm making big mistakes. This seemed like a simple solution to this issue for my server at least, and it freed up a lot of space, and the settings I've chosen have negligible compromise on image quality.
Hopefully this helps someone, or at least draws dev attention for a need for an integrated feature like this.
I understand these kind of announcements have been kind of ad-hoc in the past, but I'd like to do them more frequently in the future. My intention is to outline in broad strokes what features and parts of the framework we'll be working on in the next few months.
Warning: These notes are not a guarantee of any particular version number or release date. It just represents some of our development goals. In particular any of these numbered releases may be broken up or shifted if we make an extra release.
- Add some small new features.
- Clear our Low/Medium security backlog.
- Wrap up various on-going technical projects.
- New Content Embed System & Documentation. See OSS preview + announcement thread.
- User homepage selector plugin.
- Enhanced automated testing on pull requests with CircleCI.
- Various Rich Editor & Forum bug fixes.
- Low/Medium severity security fixes from the backlog.
ETA End of July
This one likely won't be clarified until after a few more product team meetings.
- Alt-text for images.
- Better handling of embeds on mobile devices.
The team has been doing a lot of work over the last few months on a new base controller, and static routing system. A lot of the interface and classes used here are already development but may change between now and the release where they are publicly documented.
Builtin Docker Images
Vanilla currently has a project,
vanilla-docker that is used for all of our team's development environment. These images are planned to be moved into the core repo, and have all dependencies placed inside. This will also include a production configured image & setup script for hosts that support Docker (looking at an installer for digital ocean).
Using this system the only dependency will Docker. All other tooling (php, composer, node, yarn, etc) will run inside of the containers.
Work has begun on a major refactoring of the text rendering pipeline. The goals being:
- Consistent interface for different formatters.
- Unified configuration options between Rich Editor & other formats.
- Configuration options for embeds.
- Break up
- Increased automated test coverage.
JS module system
We've begun breaking up our core typescript codebase into individual packages and publishing them to NPM. These will be published under the org. The intention is to consolidate various packages & build processes floating around.
ETA End of August
One of my favourite parts of the Vanilla is the ability to embed external content. Unfortunately until now, it has been very difficult to create custom embeds with any amount of complexity.
In the last few weeks the team has been working on finalizing our new pluggable embed system. I held it back from the 3.1 release due to a need for additional testing, but it is available for testing on the master branch of Vanilla.
Our initial documentation is written, but it will be fleshed out significantly in time for the next release. In case anyone wants to start playing with it, here it is.