Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add flag to force enable DIO regardless of the full page cache settings #702

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

convenient
Copy link

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

  1. Set up the projects to have varnish for FPC
  2. Set the project web/secure/base_media_url=https://example.com/media/ so that we can load the production media on this test instance
  3. Forcefully enable fastly DIO by setting system/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 URLs

This 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant