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

chore(docs): compress homepage screenshots, 10x smaller #11347

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

zackpollard
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the documentation Improvements or additions to documentation label Jul 25, 2024
@benmccann
Copy link
Contributor

I bet it'll be even better if you use avif. You could make it a picture tag and serve both. And ideally you could leave the original image and have a plugin transform it so that we also have the images everywhere else on the site optimized as well and don't accidentally add any non-optimized images in the future. Maybe you could use something like @docusaurus/plugin-ideal-image

@zackpollard
Copy link
Contributor Author

I bet it'll be even better if you use avif. You could make it a picture tag and serve both. And ideally you could leave the original image and have a plugin transform it so that we also have the images everywhere else on the site optimized as well and don't accidentally add any non-optimized images in the future. Maybe you could use something like @docusaurus/plugin-ideal-image

Happy for a plugin to be added but not going to do that here. Also didn't want to deal with multiple formats unless we did have an automatic plugin for it. This was just a quick fix as the current 2MB file was a bit obnoxious

@benmccann
Copy link
Contributor

I actually can't find that there's any docusaurus plugin for this. Maybe we could use a general webpack plugin like image-minimizer-webpack-plugin

My webpack knowledge isn't great. I'm pretty sure I could do it if we were using vitepress 😆

@zackpollard zackpollard merged commit b8d2d38 into main Jul 25, 2024
23 checks passed
@zackpollard zackpollard deleted the chore/compress-docs-images branch July 25, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants