Add flag to force enable DIO regardless of the full page cache settings #702
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hello
I would like to propose an additional flag, which would allow me to enable the image optimisation settings regardless of what page cache has been configured.
My use case is as follows
We have local and ephemeral test environments spinning up for automated and manual QA. They are using a docker varnish container for full page cache rather than hooking into fastly, as this is a "good enough" measure for these temporary environments.
I want those projects and setups to have a proper look and feel, i want images to be rendered correctly at the correct sizes and compressions, to achieve this I want to do the following configuration
web/secure/base_media_url=https://example.com/media/
so that we can load the production media on this test instancesystem/full_page_cache/fastly/fastly_image_optimization_configuration/image_optimizations_forced=1
, so that we can have all the appropriate resizing and compression parameters attached to the media URLsThis will give us an instance with reasonable FPC, and a good representation of the production media. This covers 99% of our test use cases, the main caveat being that anything that needs to actually test uploading images won't work. But that's an acceptable caveat I believe.
Please let me know if you would like to discuss further, I would have used a plugin to customise this on our instances but the
private function isFastlyImageOptimizationEnabled()
prevents me from doing so.Thanks