4 ms·
This has been a solved problem for years in some frameworks, e.g. all the major image upload handling libraries in Rails have this built in an it's very easy to
by mbell 8y ago
This has been a solved problem for years in some frameworks, e.g. all the major image upload handling libraries in Rails have this built in an it's very easy to use. There are also plenty of webpack plugins for static assets:
https://github.com/metalabdesign/sharp-loader https://github.com/metalabdesign/sharp-loader
https://github.com/herrstucki/responsive-loader https://github.com/herrstucki/responsive-loader
https://github.com/tcoopman/image-webpack-loader https://github.com/tcoopman/image-webpack-loader
(and many more, just grabbing a few examples)
- JimDabell 8y agoWebpack also warns you about large assets by default, although the limit is 250KB, which isn't great.