Description
Is your feature request related to a problem? Please describe.
When I upload or add image files to the project via Frontmatter CMS, the images are stored in their original format (e.g., PNG or JPEG). This leads to unnecessarily large file sizes, which negatively impacts loading times and overall performance when showcasing content—especially in documentation contexts where image-heavy pages are common. A built-in image compression and conversion workflow would significantly improve performance and streamline the content publishing process.
Describe the solution you'd like
Ideally, I would like Frontmatter CMS to automatically convert uploaded image assets (e.g., PNG, JPEG) to the .webp
format and apply compression to optimize for web usage. The WebP version should then be used in the documentation instead of the original asset, either by replacing the original reference or by exposing an easy way to use the compressed version in Markdown or frontmatter fields.
Optional settings for compression level, fallback formats, and whether to retain the original image would be useful additions.
Describe alternatives you've considered
- Manually converting and compressing images before uploading them, using external tools or build steps. This is inefficient and error-prone.
- Using build-time plugins (e.g., in a static site generator pipeline) to compress images post-upload. This works but removes visibility and control during content authoring in the CMS.
- Creating a custom image processing workflow outside Frontmatter, which increases setup complexity and reduces the benefit of using a CMS in the first place.
Additional context
This feature would be particularly valuable for documentation sites with visual content, as it would enhance load performance and reduce bandwidth. Automating this at the CMS level aligns with the goal of keeping content workflows simple and performance-optimized.