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.
This PR does two things:
Problem
By default, the SSG would reconfigure Glide to use the "cached" option and generate stuff into a directory within the static folder. This was necessary if you had the default Glide setup in Statamic which used the dynamic routes. The SSG would therefore need to generate the images at template-render-time.
However, each time you run the SSG, the whole static directory would get cleared, which includes your Glide generated images. Meaning the next time you run it, it would need to generate all the Glide images again.
Solution
Since there were improvements to Glide within the core, there are now better options than the override the SSG does. You can now tell the SSG to not override Glide and instead opt to leverage the improved core features. (The default is still to override it to maintain backwards compatibility.)
The main way to speed things up is to have the Glide generated images stick around between SSG generations.
For example you can have your images be generated to some directory (using the custom path glide setting), then copy that directory into the right place in your static folder.
Or, if you put your Glide images on S3, you can just set
'override' => false
, and rely on the S3 URLs. No copying necessary.Caveat
You need to adjust your config as mentioned above in order to get a speed increase. It's not going to happen just by upgrading.