-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Use versioned URLs for images #7932
Comments
This will help @nadonomy iterate quickly on experimental, for example. |
The ideal case would be for the URL to contain the hash of the file, so that it only changes when the file changes. If that's too hard, then using the bundle ID similar to JS and CSS URLs is a good option as well. |
see also |
I have an approach that extends the Webpack build process to add a content hash to image URLs to achieve this. However, it does require changing all JSX usages of images from: <img src="img/warning.svg" /> to: import WarningSVG from "img/warning.svg";
// ... other code ...
<img src={WarningSVG} /> Does anyone have opinions about this transformation? Feel free to add reactions here if you have them. For cases where we use images via CSS |
Fixed by matrix-org/matrix-react-sdk#2460 and #8159. |
We don't want to wait for caching to expire with quick changes.
The text was updated successfully, but these errors were encountered: