Nice to Have: Investigate using Webpack for image loading
- Dominant language
- TypeScript
- Stars
- 117
- Forks
- 51
- Avg merge
- 2d 15h
- Merged PRs (30d)
- 4
Description
This is a clone of influxdata/quartz#3911. Post-UI-unification, this is something we want to look at on the Quartz side, but also something you may or may not want to look at in the UI (if you're not already doing this). Feel free to adopt or close as you wish.
@randycoulman commented on [Fri Dec 18 2020](https://github.com/influxdata/quartz/issues/3911)
For many of the images we use, we hard-code the SVG inside a React component. For others, we store images in the `priv/static/images` directory and refer to them externally.
The tradeoff is that inlined SVGs bloat our JavaScript even when the images might not be needed on certain pages, but external images require a separate request (good) that might fail or stall (bad).
Another option would be to configure Webpack to allow us to `import` images into our app. Webpack allows configuring a size threshold. Below the threshold, it inlines the image; above it, it "bundles" the image as an external request (fingerprinting it for cache busting as well, if so configured).
---
@gunnaraasen commented on [Thu Apr 01 2021](https://github.com/influxdata/quartz/issues/3911#issuecomment-812168937)
Closing this and will let UI team handle it.
---
@gunnaraasen commented on [Thu Apr 01 2021](https://github.com/influxdata/quartz/issues/3911#issuecomment-812169166)
Reopening as we do images that we load.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.