stride-docs
stride-docs copied to clipboard
🗂️🔍 Centralize Media Files for Efficient Storage and Faster Deployment
We currently have multiple versions of the same media files due to supporting multiple versions and languages. These files are stored in various folders:
/4.1/en [316 MB]
/4.1/jp [317 MB]
/4.0/en
/4.0/jp
and so on for 3.1, 3.0
While it's beneficial to have media files close to their related documentation, this setup unnecessarily bloats storage and increases deployment time, as these files need to be copied and moved throughout the deployment process.
Proposed Solutions
Ideally, we are looking for a solution that is simple to implement and easy to maintain in the long term.
1. Centralized Storage with Fixed References
In this solution, all files would be stored in a central location, potentially maintaining a similar folder structure as the current setup for easy identification. When new versions or languages are added, they would point to this initial location unless the image has been updated or a language-specific image was created. This approach would require updating all existing media file references to point to the new storage location.
Suggested by @IXLLEGACYIXL: Symlinks could facilitate the re-linking process, and robocopy could be used for efficient file copying.
2. Centralized Storage with Dynamic Loading via Version and Language Tags
In this alternative approach, media files could be tagged with their corresponding version and language. A script would then dynamically load the appropriate media file based on the documentation being viewed. This avoids duplication but might require a more complex loading mechanism.
This second option already suggest more complexity and gears: Image Upload and Tagging, Image Retrieval Based on Tags.
Any other solutions?