[5.x] Support storing meta data as content #11998
Open
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 has the potential to resolve a lot of issues people have with remote storage of assets.
Related issues:
There are also a lot of Discord discussions about S3 storage being slow. These almost all are resolved by moving the meta data to local storage through the eloquent driver.
The problem with both S3 and eloquent driver storage of meta data is that you lose one of the key features of Statamic - flat file git tracking. This means that if the focal point, custom fields, or other meta data is changed it is not tracked via git.
This PR provides the option to store the asset meta data as content - in the content directory and thus available to be tracked/synced by git.
--
I only provided two tests atm because I am not sure how deeply this needs to be tested as it just changes the paths where things are stored. Let me know if there are other points I need to test at and I will add them.
Also, I could foresee people requesting a command to migrate the asset meta from the standard storage mechanism and back.
Maybe in the future this feature gets turned on by default? 😄