Open JaneJeon opened 1 year ago
Hey @JaneJeon. Can you please explain the issue a little more, what are those images needs to be minimized.?
Hi, so basically in the front page of the documentation website (https://docs.blink.rest), you'll see some images.
I am planning on adding more images and diagrams to help explain more things - in general - but as I add more images to the documentation, I've been thinking of the impact it would have on the load time.
So I think having docusaurus optimize any and all images (off the top of my head, the ideal is jpeg with ~85% detail ratio) that are included in the documentation websites - automatically, at build time, so that the resulting build has those optimized images without me having to pre-optimize the images myself when I include screenshots and diagrams - would really be conducive to adding more images to the documentation website.
Hi Jane, I was wondering if you can just change loading
inside the img tag to lazy mode, so if you do not scroll to that image, the image will not load immediately. I think that may help you optimize the loading issues.
https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-ideal-image
https://github.com/facebook/docusaurus/blob/main/packages/docusaurus-plugin-ideal-image/src/theme/IdealImage/index.tsx